Cleanup, reset scroll position on definition lookup (#20)
This commit is contained in:
parent
aa1a2b0176
commit
f22fcb0a5d
@ -100,9 +100,11 @@ class Driver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onMouseDown(e) {
|
onMouseDown(e) {
|
||||||
|
this.lastMousePos = {x: e.clientX, y: e.clientY};
|
||||||
|
this.popupTimerClear();
|
||||||
|
|
||||||
if (this.popup.visible()) {
|
if (this.popup.visible()) {
|
||||||
const selection = window.getSelection();
|
this.hidePopup();
|
||||||
selection.removeAllRanges();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,6 +66,8 @@ class Popup {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.container.contentWindow.scrollTo(0, 0);
|
||||||
|
|
||||||
const doc = this.container.contentDocument;
|
const doc = this.container.contentDocument;
|
||||||
doc.open();
|
doc.open();
|
||||||
doc.write(content);
|
doc.write(content);
|
||||||
|
Loading…
Reference in New Issue
Block a user