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