mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-01-31 20:21:36 +01: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() {
|
setupListeners() {
|
||||||
this.container.addEventListener('change', event => {
|
this.container.addEventListener('input', event => {
|
||||||
|
|
||||||
/** @var {AddRemoveRows} **/
|
/** @var {AddRemoveRows} **/
|
||||||
const addRemoveComponent = window.$components.firstOnElement(this.addRemoveComponentEl, 'add-remove-rows');
|
const addRemoveComponent = window.$components.firstOnElement(this.addRemoveComponentEl, 'add-remove-rows');
|
||||||
if (!this.hasEmptyRows()) {
|
if (!this.hasEmptyRows() && event.target.value) {
|
||||||
addRemoveComponent.add();
|
addRemoveComponent.add();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user