From dd17e8f01881b1356b04e48566f0026b60e4d0bc Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Tue, 21 Oct 2014 10:19:41 -0600 Subject: [PATCH] Replace focusout event handlers on hiddenInput shim with blur handlers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/text-editor-view.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/text-editor-view.coffee b/src/text-editor-view.coffee index b62535fed..89540bf9c 100644 --- a/src/text-editor-view.coffee +++ b/src/text-editor-view.coffee @@ -80,6 +80,10 @@ class TextEditorView extends View @overlayer = $("
").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')