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
|
// ensures textarea scroll position is correct
|
||||||
_focusTextArea() {
|
_focusTextArea() {
|
||||||
const textarea = this.element.querySelector("textarea.d-editor-input");
|
|
||||||
schedule("afterRender", () => {
|
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.blur();
|
||||||
textarea.focus();
|
textarea.focus();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue