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:
Max Brunsfeld
2016-12-08 16:12:26 -08:00
committed by Damien Guard
parent efd20774de
commit 6f4a506517
3 changed files with 1 additions and 4 deletions

View File

@@ -2,9 +2,6 @@ module.exports =
class InputComponent
constructor: (@domNode) ->
getDomNode: ->
@domNode
updateSync: (state) ->
@oldState ?= {}
newState = state.hiddenInput

View File

@@ -346,7 +346,6 @@ class TextEditorComponent
focused: ->
if @mounted
@presenter.setFocused(true)
@hiddenInputComponent.getDomNode().focus()
blurred: ->
if @mounted

View File

@@ -139,6 +139,7 @@ class TextEditorElement extends HTMLElement
focused: (event) ->
@component?.focused()
@hiddenInputElement.focus()
blurred: (event) ->
if event.relatedTarget is @hiddenInputElement