From 666d202eb67410b73473d82fe6a3b4d705e05979 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 16 Sep 2013 11:03:40 +0800 Subject: [PATCH] Add spec for syncing cursorView and hiddenInput's position. --- spec/editor-spec.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/editor-spec.coffee b/spec/editor-spec.coffee index 9d3895a52..ed617f9f0 100644 --- a/spec/editor-spec.coffee +++ b/spec/editor-spec.coffee @@ -884,6 +884,10 @@ describe "Editor", -> expect(editor.getSelection().isEmpty()).toBeTruthy() expect(cursorView).toBeVisible() + it "moves the hiddenInput to the same position with cursor's view", -> + editor.setCursorScreenPosition(row: 2, column: 2) + expect(editor.getCursorView().offset()).toEqual(editor.hiddenInput.offset()) + describe "when the editor is using a variable-width font", -> beforeEach -> editor.setFontFamily('sans-serif')