mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-22 12:30:27 +08:00
Tweak tag list to add new row on input instead of change
Prevented interferance with the user's action if they interacted with something below the tags, since a new row would be added on blur and hence shift down positions. For #3931
This commit is contained in:
parent
f6a6b11ec5
commit
3202f96181
|
@ -10,10 +10,11 @@ export class TagManager extends Component {
|
|||
}
|
||||
|
||||
setupListeners() {
|
||||
this.container.addEventListener('change', event => {
|
||||
this.container.addEventListener('input', event => {
|
||||
|
||||
/** @var {AddRemoveRows} **/
|
||||
const addRemoveComponent = window.$components.firstOnElement(this.addRemoveComponentEl, 'add-remove-rows');
|
||||
if (!this.hasEmptyRows()) {
|
||||
if (!this.hasEmptyRows() && event.target.value) {
|
||||
addRemoveComponent.add();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user