mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 10:18:45 +08:00
Trigger input event when text is programmatically inserted
This commit is contained in:
parent
c13dfa2228
commit
b826f9ce36
|
@ -154,6 +154,8 @@ export default class TextEditor extends Component {
|
|||
const pos = index + insert.length;
|
||||
this.setSelectionRange(pos, pos);
|
||||
}
|
||||
|
||||
textarea.dispatchEvent(new CustomEvent('input', {bubbles: true, cancelable: true}));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user