Fix selection of text when 3D touching a token on iOS
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
function usePreventSelect() {
|
||||
function clearSelection() {
|
||||
if (window.getSelection) {
|
||||
window.getSelection().removeAllRanges();
|
||||
}
|
||||
if (document.selection) {
|
||||
document.selection.empty();
|
||||
}
|
||||
}
|
||||
function preventSelect() {
|
||||
clearSelection();
|
||||
document.body.classList.add("no-select");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user