Merge pull request #443 from toasted-nutbread/fix-get-selection

Fix getSelection not working in QueryParser
This commit is contained in:
toasted-nutbread 2020-04-12 11:42:56 -04:00 committed by GitHub
commit 778d49f86b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ class DisplaySearch extends Display {
onCopy() { onCopy() {
// ignore copy from search page // ignore copy from search page
this.clipboardMonitor.setPreviousText(document.getSelection().toString().trim()); this.clipboardMonitor.setPreviousText(window.getSelection().toString().trim());
} }
onExternalSearchUpdate({text}) { onExternalSearchUpdate({text}) {

View File

@ -133,7 +133,7 @@ class TextScanner {
this.preventNextClick = false; this.preventNextClick = false;
const primaryTouch = e.changedTouches[0]; const primaryTouch = e.changedTouches[0];
if (DOM.isPointInSelection(primaryTouch.clientX, primaryTouch.clientY, this.node.getSelection())) { if (DOM.isPointInSelection(primaryTouch.clientX, primaryTouch.clientY, window.getSelection())) {
return; return;
} }