mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Prevent focusout events on hidden input when clicking focused editors
Fixes #3384 This is achieved by calling .preventDefault() on mousedown events when the editor is already focused, which prevents the moving of focus to the editor itself.
This commit is contained in:
@@ -614,6 +614,9 @@ EditorComponent = React.createClass
|
||||
# CTRL+click brings up the context menu on OSX, so don't handle those either
|
||||
return if ctrlKey and process.platform is 'darwin'
|
||||
|
||||
# Prevent focusout event on hidden input if editor is already focused
|
||||
event.preventDefault() if @state.focused
|
||||
|
||||
screenPosition = @screenPositionForMouseEvent(event)
|
||||
|
||||
if event.target?.classList.contains('fold-marker')
|
||||
|
||||
Reference in New Issue
Block a user