[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search methods added to the WebView control


Am 18.04.25 um 13:48 schrieb Benoît Minisini:
By typing "unselect text in javascript" in a search engine, I get that first answer: https://stackoverflow.com/questions/6562727/is-there-a-function-to-deselect-all-text-using-javascript
Regards,

Your search query was the better one!  This removes all text markings:

WebViewDocView.ExecJavascript("if (window.getSelection) {window.getSelection().removeAllRanges();} else if (document.selection) {document.selection.empty();}")

The minimum version ..

WebViewDocView.ExecJavascript("{window.getSelection().removeAllRanges();}")

does as well for my purposes.

Thanks and best regards

Claus




References:
Search methods added to the WebView controlBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Search methods added to the WebView controlClaus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Search methods added to the WebView controlClaus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Search methods added to the WebView controlBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Search methods added to the WebView controlClaus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Search methods added to the WebView controlClaus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Search methods added to the WebView controlBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Search methods added to the WebView controlClaus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: Search methods added to the WebView controlBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>