use tracker afterFlush to set focus

This commit is contained in:
tod31 2021-04-11 20:07:31 +02:00
parent a8a3c9ad19
commit 31eb9b26b4

View file

@ -287,7 +287,12 @@ CardCustomField.register('cardCustomField');
let items = this.getItems();
items.splice(idx + 1, 0, '');
this.stringtemplateItems.set(items);
//event.target.nextSibling.focus();
Tracker.afterFlush(() => {
const element = this.findAll('input')[idx + 1];
element.focus();
element.value = '';
});
}
}
}