Is there an event for the end of text selection on iOS?
I know I can run an event when the selection changes through the following:
document.addEventListener("selectionchange", function(event) {
var text = window.getSelection().toString();
$(".output").append("<div>" + text + "</div>");
}, false);
<div class="output"></div>
This will update .output
with the selected text, but runs every time the selection changes. What I would want, is to only capture the text after the selection has finished.
Is there any such event? Is it possible to do something like this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…