Move hidden input to the same position with cursor view.

This is required to make IME's input bubble follow the cursor.
This commit is contained in:
Cheng Zhao
2013-09-14 18:21:10 +08:00
parent a3069edec0
commit 0c839f419a

View File

@@ -88,6 +88,7 @@ class Editor extends View
@configure()
@bindKeys()
@handleEvents()
@handleImeEvents()
@cursorViews = []
@selectionViews = []
@pendingChanges = []
@@ -696,6 +697,10 @@ class Editor extends View
else
@gutter.addClass('drop-shadow')
handleImeEvents: ->
@on 'cursor:moved', =>
@hiddenInput.offset(@getCursorView().offset())
selectOnMousemoveUntilMouseup: ->
lastMoveEvent = null
moveHandler = (event = lastMoveEvent) =>