Merge pull request #443 from toasted-nutbread/fix-get-selection
Fix getSelection not working in QueryParser
This commit is contained in:
commit
778d49f86b
@ -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}) {
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user