From a45385be98fa9614de0cd7da778bc72c3715d858 Mon Sep 17 00:00:00 2001 From: Jmeas Date: Sat, 15 Nov 2014 19:28:11 +0100 Subject: [PATCH] Sets offset of fontMetrics div to be 0. Offsetting the fontMetrics div causes the 'ghost image' created when drag and dropping an Ace Editor to be offset by that same amount. By removing the offset we fix the problem. Closes #2240. --- lib/ace/layer/font_metrics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ace/layer/font_metrics.js b/lib/ace/layer/font_metrics.js index 63c9fcc6..7e71f8a8 100644 --- a/lib/ace/layer/font_metrics.js +++ b/lib/ace/layer/font_metrics.js @@ -82,9 +82,9 @@ var FontMetrics = exports.FontMetrics = function(parentEl, interval) { this.$setMeasureNodeStyles = function(style, isRoot) { style.width = style.height = "auto"; - style.left = style.top = "-100px"; + style.left = style.top = "0px"; style.visibility = "hidden"; - style.position = "fixed"; + style.position = "absolute"; style.whiteSpace = "pre"; if (useragent.isIE < 8) {