Functions document.getSelection() and window.getSelection() do not work in iOS 12.
The problem is reproduced in Safari, Google Chrome and WKWebView.
In iOS 11 and MacOS (any version), these functions are work.
Can you advise?
document.querySelector("#contentjs").onclick = function () {
console.log(document.getSelection());
document.querySelector("#result").innerHTML = document.getSelection().anchorOffset;
}
from getSelection not working properly in iOS 12

No comments:
Post a Comment