mirror of
https://github.com/atom/atom.git
synced 2026-01-24 22:38:20 -05:00
Set useCapture to true when handling keydown events in test windows
Prevents these events from getting intercepted by other handlers.
This commit is contained in:
@@ -17,7 +17,7 @@ try
|
||||
# that are focused in the very first spec run.
|
||||
remote.getCurrentWindow().show() unless getWindowLoadSettings().headless
|
||||
|
||||
window.addEventListener 'keydown', (event) ->
|
||||
handleKeydown = (event) ->
|
||||
# Reload: cmd-r / ctrl-r
|
||||
if (event.metaKey or event.ctrlKey) and event.keyCode is 82
|
||||
ipc.send('call-window-method', 'restart')
|
||||
@@ -30,6 +30,8 @@ try
|
||||
if (event.metaKey or event.ctrlKey) and event.keyCode is 87
|
||||
ipc.send('call-window-method', 'close')
|
||||
|
||||
window.addEventListener('keydown', handleKeydown, true)
|
||||
|
||||
# Add 'exports' to module search path.
|
||||
exportsPath = path.join(getWindowLoadSettings().resourcePath, 'exports')
|
||||
require('module').globalPaths.push(exportsPath)
|
||||
|
||||
Reference in New Issue
Block a user