Fix: popup position is wrong sometimes

master
cuixiping 2020-01-07 16:41:49 +08:00
parent 4f6def7582
commit 2e7ca91ea5
1 changed files with 1 additions and 1 deletions

View File

@ -2945,7 +2945,6 @@ editor.init = function () {
} }
let timer; let timer;
const pos = $(showSel).position();
// Clicking the "show" icon should set the current mode // Clicking the "show" icon should set the current mode
shower.mousedown(function (evt) { shower.mousedown(function (evt) {
@ -2953,6 +2952,7 @@ editor.init = function () {
return false; return false;
} }
const holder = $(holdSel); const holder = $(holdSel);
const pos = $(showSel).position();
const l = pos.left + 34; const l = pos.left + 34;
const w = holder.width() * -1; const w = holder.width() * -1;
const time = holder.data('shown_popop') ? 200 : 0; const time = holder.data('shown_popop') ? 200 : 0;