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.
Asked
Active
Viewed 2,007 times
1

Marcus Adams
- 53,009
- 9
- 91
- 143

Satyam
- 15,493
- 31
- 131
- 244
-
JavaScript solution or Objective-c? – Marcus Adams Aug 13 '13 at 14:40
-
@MarcusAdams, its in javascript. I'm creating webpage that has to work with Safari on iPad. – Satyam Aug 13 '13 at 14:43
-
Take a look at: [How to capture iOS Safari event on text selection change within Javascript?](http://stackoverflow.com/questions/13878593/how-to-capture-ios-safari-event-on-text-selection-change-within-javascript) – Marcus Adams Aug 13 '13 at 14:44
-
@MarcusAdams, Thanks. I'll try it as mentioned – Satyam Aug 13 '13 at 14:48
1 Answers
1
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);