From a92a65929aa9b165cccc869df6d54380253129eb Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 14 Sep 2013 20:10:36 +0800 Subject: [PATCH] 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. --- src/editor.coffee | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/editor.coffee b/src/editor.coffee index b14ae350b..8ba98fa7e 100644 --- a/src/editor.coffee +++ b/src/editor.coffee @@ -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: ->