mirror of
https://github.com/atom/atom.git
synced 2026-01-15 01:48:15 -05:00
Forward compositionstart/end events to KeymapManager to avoid IME issues
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
"electronVersion": "1.3.6",
|
||||
"dependencies": {
|
||||
"async": "0.2.6",
|
||||
"atom-keymap": "7.1.4",
|
||||
"atom-keymap": "7.2.0",
|
||||
"atom-space-pen-views": "^2.0.0",
|
||||
"atom-ui": "0.4.1",
|
||||
"babel-core": "5.8.38",
|
||||
|
||||
@@ -14,6 +14,8 @@ class WindowEventHandler
|
||||
|
||||
@addEventListener(@document, 'keyup', @handleDocumentKeyEvent)
|
||||
@addEventListener(@document, 'keydown', @handleDocumentKeyEvent)
|
||||
@addEventListener(@document, 'compositionstart', @handleDocumentCompositionStartEvent)
|
||||
@addEventListener(@document, 'compositionend', @handleDocumentCompositionEndEvent)
|
||||
@addEventListener(@document, 'drop', @handleDocumentDrop)
|
||||
@addEventListener(@document, 'dragover', @handleDocumentDragover)
|
||||
@addEventListener(@document, 'contextmenu', @handleDocumentContextmenu)
|
||||
@@ -76,6 +78,12 @@ class WindowEventHandler
|
||||
@atomEnvironment.keymaps.handleKeyboardEvent(event)
|
||||
event.stopImmediatePropagation()
|
||||
|
||||
handleDocumentCompositionStartEvent: =>
|
||||
@atomEnvironment.keymaps.handleCompositionStart()
|
||||
|
||||
handleDocumentCompositionEndEvent: =>
|
||||
@atomEnvironment.keymaps.handleCompositionEnd()
|
||||
|
||||
handleDrop: (event) ->
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
|
||||
Reference in New Issue
Block a user