I have several custom UIMenuItems that do things with a selection in a UIWebView. After the action has been run on that selection I want to hide the selection handles just as copy:
does.
I have tried using window.getSelection().removeAllRanges();
and that works in that window.getSelection()
no longer returns anything but the text selection handles stay visible.
Is there a way to remove the selection and the handles with it?
Edit: I don't need it to be a JS solution but I can't loose the state by reloading the webview.