Javascript indexSizeError for window.getSelection().getRangeAt(0) in WKWebview in iOS 17

window.getSelection().getRangeAt(0) is giving indexSizeError after selecting text from wkwebview in iOS 17. We are using evaluateJavascript functions for interactions. This was working fine in earlier versions. This problem is seen since the recent iOS 17 upgrade.

Replies

Probably best to file a bug on <https://bugs.webkit.org/> with a test HTML file (or URL) that reproduces the issue.