mirror of
https://github.com/atom/atom.git
synced 2026-02-19 02:44:29 -05:00
Make blur event on text editor element work with shadow DOM disabled
When the shadow DOM is enabled, this happens organically because the focus is abstracted across the shadow boundary. Without that abstraction boundary, we need to pretend that a blur of the hidden input is actually a blur of the entire editor. Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
@@ -95,6 +95,7 @@ class TextEditorElement extends HTMLElement
|
||||
lineOverdrawMargin: @lineOverdrawMargin
|
||||
)
|
||||
@component = React.renderComponent(@componentDescriptor, @rootElement)
|
||||
@component.refs.input.getDOMNode().addEventListener 'blur', => @dispatchEvent(new FocusEvent('blur', bubbles: false))
|
||||
|
||||
unmountComponent: ->
|
||||
return unless @component?.isMounted()
|
||||
|
||||
Reference in New Issue
Block a user