From 3fc47ec2158c8c430ab9b0325cdef299f3c76495 Mon Sep 17 00:00:00 2001 From: Ben Klein Date: Fri, 5 Jun 2020 05:09:16 -0400 Subject: [PATCH] TextEditorComponent hiddenInput preventScroll --- src/text-editor-component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/text-editor-component.js b/src/text-editor-component.js index fff4fd224..c879816f4 100644 --- a/src/text-editor-component.js +++ b/src/text-editor-component.js @@ -1673,7 +1673,7 @@ module.exports = class TextEditorComponent { this.scheduleUpdate(); } - this.getHiddenInput().focus(); + this.getHiddenInput().focus({preventScroll:true}); } // Called by TextEditorElement so that this function is always the first @@ -1932,7 +1932,7 @@ module.exports = class TextEditorComponent { // Disabling the hidden input makes it lose focus as well, so we have to // re-enable and re-focus it. this.getHiddenInput().disabled = false; - this.getHiddenInput().focus(); + this.getHiddenInput().focus({preventScroll:true}); }); return; }