FIX: makes focust text area after complete more resilient (#9879)
This commit is contained in:
parent
3d20a1143b
commit
253a185769
|
@ -898,8 +898,16 @@ export default Component.extend({
|
|||
|
||||
// ensures textarea scroll position is correct
|
||||
_focusTextArea() {
|
||||
const textarea = this.element.querySelector("textarea.d-editor-input");
|
||||
schedule("afterRender", () => {
|
||||
if (!this.element || this.isDestroying || this.isDestroyed) {
|
||||
return;
|
||||
}
|
||||
|
||||
const textarea = this.element.querySelector("textarea.d-editor-input");
|
||||
if (!textarea) {
|
||||
return;
|
||||
}
|
||||
|
||||
textarea.blur();
|
||||
textarea.focus();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue