From 176021ccd85630abbc3af4001f9a590d4277e584 Mon Sep 17 00:00:00 2001 From: "Cheng-Han, Wu" Date: Thu, 11 Feb 2016 02:38:19 -0600 Subject: [PATCH] Fixed cursor-tag and cursor-menu might not on correct position --- public/js/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/js/index.js b/public/js/index.js index ad77e0d..1150f7a 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1781,6 +1781,7 @@ function checkCursorTag(coord, ele) { buildMapInner(); var left = coord.left; var top = lineHeightMap[cursor.line] * defaultTextHeight; //coord.top; + top -= dropdown.closest('.CodeMirror-sizer > *').position().top; var offsetLeft = -3; var offsetTop = defaultTextHeight; var statusBarHeight = 0; @@ -2354,6 +2355,7 @@ function checkCursorMenu() { buildMapInner(); var left = coord.left; var top = lineHeightMap[cursor.line] * defaultTextHeight; //coord.top; + top -= dropdown.closest('.CodeMirror-sizer > *').position().top; var offsetLeft = 0; var offsetTop = defaultTextHeight; var statusBarHeight = 0;