mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Merge pull request #1107 from atom/ks-editor-scroll
Fix editor occasionally going blank
This commit is contained in:
@@ -74,6 +74,16 @@ describe "Editor", ->
|
||||
|
||||
expect(editor.hiddenInput).toMatchSelector ':focus'
|
||||
expect($(editor[0]).scrollTop()).toBe 0
|
||||
expect($(editor.scrollView[0]).scrollTop()).toBe 0
|
||||
|
||||
editor.moveCursorToBottom()
|
||||
editor.hiddenInput.blur()
|
||||
editor.scrollTop(0)
|
||||
editor.focus()
|
||||
|
||||
expect(editor.hiddenInput).toMatchSelector ':focus'
|
||||
expect($(editor[0]).scrollTop()).toBe 0
|
||||
expect($(editor.scrollView[0]).scrollTop()).toBe 0
|
||||
|
||||
describe "when the hidden input is focused / unfocused", ->
|
||||
it "assigns the isFocused flag on the editor and also adds/removes the .focused css class", ->
|
||||
|
||||
@@ -644,6 +644,7 @@ class Editor extends View
|
||||
false
|
||||
|
||||
@hiddenInput.on 'focus', =>
|
||||
@bringHiddenInputIntoView()
|
||||
@isFocused = true
|
||||
@addClass 'is-focused'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user