mirror of
https://github.com/atom/atom.git
synced 2026-01-24 06:18:03 -05:00
Listen on Editor for bubbled textInput events instead of directly on hidden input
This commit is contained in:
@@ -125,6 +125,9 @@ $.fn.attachToDom = ->
|
||||
$('#jasmine-content').append(this)
|
||||
|
||||
$.fn.textInput = (data) ->
|
||||
event = document.createEvent 'TextEvent'
|
||||
event.initTextEvent('textInput', true, true, window, data)
|
||||
this.each -> this.dispatchEvent(event)
|
||||
this.each ->
|
||||
event = document.createEvent('TextEvent')
|
||||
event.initTextEvent('textInput', true, true, window, data)
|
||||
event = jQuery.event.fix(event)
|
||||
$(this).trigger(event)
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ class Editor extends View
|
||||
|
||||
@selectOnMousemoveUntilMouseup()
|
||||
|
||||
@hiddenInput.on "textInput", (e) =>
|
||||
@on "textInput", (e) =>
|
||||
@insertText(e.originalEvent.data)
|
||||
|
||||
@scroller.on 'scroll', =>
|
||||
|
||||
Reference in New Issue
Block a user