Post

Replies

Boosts

Views

Activity

Reply to IOS 15, javascript functions window.getSelection() or document.getSelection() not working
It was very hard to find the solution for this, as I had some problems in an application that required to get the selected text from the user, and the only devices we were having troubles were iOS devices (any browsers). So, googling about it, I came across bunch of Apple forums, until I found this issue and its correspondent JSFiddle (https://jsfiddle.net/JasonMore/gWZfb). When I tested in my iPad in a localhost quick test, it worked perfectly. It would be really great if Apple exposed it somehow or even better, if we did not have to deal with this kind of approaches to get a simple selection from the user. Hope I have helped somehow.
Aug ’23