Skip to content

Commit 3202f96

Browse files
committed
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
1 parent f6a6b11 commit 3202f96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

resources/js/components/tag-manager.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ export class TagManager extends Component {
1010
}
1111

1212
setupListeners() {
13-
this.container.addEventListener('change', event => {
13+
this.container.addEventListener('input', event => {
14+
1415
/** @var {AddRemoveRows} **/
1516
const addRemoveComponent = window.$components.firstOnElement(this.addRemoveComponentEl, 'add-remove-rows');
16-
if (!this.hasEmptyRows()) {
17+
if (!this.hasEmptyRows() && event.target.value) {
1718
addRemoveComponent.add();
1819
}
1920
});

0 commit comments

Comments
 (0)