Question

I'm creating a web page for iPad Safari browser, which is related to a book where user can select the text and change background color or add some comments/notes etc.
I'm trying to track the events for text selection like text selection started, text selection changed, text selection ended, text selection increasing (when user still want to add more text) etc.
But I couldn't find appropriate details related to it.
has any one come acorss such selection events in iPad web page.

Was it helpful?

Solution

As mentioned in:How to capture iOS Safari event on text selection change within Javascript?

The answer is:

document.addEventListener("selectionchange", function() {
    alert("Selection changed!");
}, false);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top