From 6402f02c31ef993c3c436c4df8cb5a754716a86b Mon Sep 17 00:00:00 2001 From: Ben Klein Date: Fri, 5 Jun 2020 05:14:38 -0400 Subject: [PATCH] TextEditorComponent didFocusHiddenInput no zeroing --- src/text-editor-component.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/text-editor-component.js b/src/text-editor-component.js index c879816f4..99398b6fd 100644 --- a/src/text-editor-component.js +++ b/src/text-editor-component.js @@ -1698,12 +1698,6 @@ module.exports = class TextEditorComponent { } didFocusHiddenInput() { - // Focusing the hidden input when it is off-screen causes the browser to - // scroll it into view. Since we use synthetic scrolling this behavior - // causes all the lines to disappear so we counteract it by always setting - // the scroll position to 0. - this.refs.scrollContainer.scrollTop = 0; - this.refs.scrollContainer.scrollLeft = 0; if (!this.focused) { this.focused = true; this.startCursorBlinking();