Make hiddentInput bigger when inputing with IME.

Some IME's input bubble would have strange behavior when they thought
the target input box is small.
This commit is contained in:
Cheng Zhao
2013-09-14 20:10:36 +08:00
parent c9d4c761bb
commit a92a65929a

View File

@@ -705,11 +705,13 @@ class Editor extends View
startScreenPosition = null
@hiddenInput.on 'compositionstart', =>
startScreenPosition = @getCursorScreenPosition()
@hiddenInput.css('width', '100%')
@hiddenInput.on 'compositionupdate', (e) =>
@insertText(e.originalEvent.data)
@selectToScreenPosition(startScreenPosition)
@hiddenInput.on 'compositionend', =>
@delete()
@hiddenInput.css('width', '1px')
startScreenPosition = null
selectOnMousemoveUntilMouseup: ->