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) {
|
||||
this.lastMousePos = {x: e.clientX, y: e.clientY};
|
||||
this.popupTimerClear();
|
||||
|
||||
if (this.popup.visible()) {
|
||||
const selection = window.getSelection();
|
||||
selection.removeAllRanges();
|
||||
this.hidePopup();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,6 +66,8 @@ class Popup {
|
||||
return;
|
||||
}
|
||||
|
||||
this.container.contentWindow.scrollTo(0, 0);
|
||||
|
||||
const doc = this.container.contentDocument;
|
||||
doc.open();
|
||||
doc.write(content);
|
||||
|
Loading…
Reference in New Issue
Block a user