mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Remove InputComponent.getDomNode method
Access the dom node directly in TextEditorElement instead Signed-off-by: Damien Guard <damieng@github.com>
This commit is contained in:
committed by
Damien Guard
parent
efd20774de
commit
6f4a506517
@@ -2,9 +2,6 @@ module.exports =
|
||||
class InputComponent
|
||||
constructor: (@domNode) ->
|
||||
|
||||
getDomNode: ->
|
||||
@domNode
|
||||
|
||||
updateSync: (state) ->
|
||||
@oldState ?= {}
|
||||
newState = state.hiddenInput
|
||||
|
||||
@@ -346,7 +346,6 @@ class TextEditorComponent
|
||||
focused: ->
|
||||
if @mounted
|
||||
@presenter.setFocused(true)
|
||||
@hiddenInputComponent.getDomNode().focus()
|
||||
|
||||
blurred: ->
|
||||
if @mounted
|
||||
|
||||
@@ -139,6 +139,7 @@ class TextEditorElement extends HTMLElement
|
||||
|
||||
focused: (event) ->
|
||||
@component?.focused()
|
||||
@hiddenInputElement.focus()
|
||||
|
||||
blurred: (event) ->
|
||||
if event.relatedTarget is @hiddenInputElement
|
||||
|
||||
Reference in New Issue
Block a user