From 7bd62790d2ea80ad9d06c67717fdc0da896fadad Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 24 Nov 2015 14:02:34 +0100 Subject: [PATCH] :memo: --- src/application-delegate.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/application-delegate.coffee b/src/application-delegate.coffee index 52e08e648..d6937f2d3 100644 --- a/src/application-delegate.coffee +++ b/src/application-delegate.coffee @@ -67,6 +67,9 @@ class ApplicationDelegate openWindowDevTools: -> new Promise (resolve) -> + # Defer DevTools interaction to the next tick, because using them during + # event handling causes some wrong input events to be triggered on + # `TextEditorComponent` (Ref.: https://github.com/atom/atom/issues/9697). process.nextTick -> if remote.getCurrentWindow().isDevToolsOpened() resolve() @@ -76,6 +79,9 @@ class ApplicationDelegate closeWindowDevTools: -> new Promise (resolve) -> + # Defer DevTools interaction to the next tick, because using them during + # event handling causes some wrong input events to be triggered on + # `TextEditorComponent` (Ref.: https://github.com/atom/atom/issues/9697). process.nextTick -> unless remote.getCurrentWindow().isDevToolsOpened() resolve() @@ -85,6 +91,9 @@ class ApplicationDelegate toggleWindowDevTools: -> new Promise (resolve) => + # Defer DevTools interaction to the next tick, because using them during + # event handling causes some wrong input events to be triggered on + # `TextEditorComponent` (Ref.: https://github.com/atom/atom/issues/9697). process.nextTick => if remote.getCurrentWindow().isDevToolsOpened() @closeWindowDevTools().then(resolve)