Fix that the translation panel appears at (0,0)

This commit is contained in:
sienori 2018-11-15 22:19:52 +09:00
parent ab8bf6205c
commit 02946b6106

View file

@ -38,6 +38,8 @@ async function Select(e) {
const shouldTranslate = existsSelectionWord && isLeftClick && isPanelOutside;
if (!shouldTranslate) return;
clickPosition = e;
//選択した言語が翻訳先言語と異なるか判定
const shouldShowButtons = S.get().whenSelectText != "dontShowButton";
if (S.get().ifCheckLang && shouldShowButtons) {
@ -45,7 +47,6 @@ async function Select(e) {
if (!shouldTranslate) return;
}
clickPosition = e;
switch (S.get().whenSelectText) {
case "showButton":
if (selectionWord.length == 0) return;