Replace focusout event handlers on hiddenInput shim with blur handlers

The focusout event doesn’t seem to work for elements in the shadow DOM.
Other people seem to share this experience:

https://code.google.com/p/chromium/issues/detail?id=378163#c7
This commit is contained in:
Nathan Sobo
2014-10-21 10:19:41 -06:00
parent cf3f1aa2eb
commit dd17e8f018

View File

@@ -80,6 +80,10 @@ class TextEditorView extends View
@overlayer = $("<div class='overlayer'></div>").appendTo(this)
@hiddenInput = @root.find('.hidden-input')
@hiddenInput.on = (args...) =>
args[0] = 'blur' if args[0] is 'focusout'
$::on.apply(this, args)
@subscribe atom.config.observe 'editor.showLineNumbers', =>
@gutter = @root.find('.gutter')