You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When navigating to a URL that contains a text fragment to highlight some text on that page and then navigating to the same URL but with a different text fragment to highlight some other text on that page, the previous highlighting does not get cleared and stays visible, even though the new URL contains only the new text fragment. Since it is actually possible in the text fragment standard to highlight multiple text passages at once by specifying all of them in the URL, I consider this a bug, because I explicitly do not list the old text fragment in the new URL, yet its highlighting remains in addition to the new one.
This reproduces in Edge, see the repro steps below.
Since we use that feature to natively (as in "no Javascript shenanigans") highlight and scroll to different parts of a page we cannot accept the old highlighting to remain visible. Our current workaround is to perform a brief intermediate "clearing" navigation to the same URL without any text fragment at all, and then to the URL with the new text fragment. This clearing navigation gets rid of any highlighting, however it briefly scrolls the page to the top (as expected) before the following navigation highlights the actual new text fragment. This "flickering" is quite bad UX and also not the most stable approach, because since there is no completed handler for the WebView2 Navigate API, we need to temporarily register a NavigationCompleted event handler which continues with the actual navigation to the URL with the new text fragment and then remove it again.
Importance
Moderate. My app's user experience is affected, but still usable.
If you think it is Edge browser problem - you should report it using Feedback tool in Edge (... -> Help and feedback -> Send feedback, or alt + shift + i) - it will find the owners faster. Thanks.
What happened?
When navigating to a URL that contains a text fragment to highlight some text on that page and then navigating to the same URL but with a different text fragment to highlight some other text on that page, the previous highlighting does not get cleared and stays visible, even though the new URL contains only the new text fragment. Since it is actually possible in the text fragment standard to highlight multiple text passages at once by specifying all of them in the URL, I consider this a bug, because I explicitly do not list the old text fragment in the new URL, yet its highlighting remains in addition to the new one.
This reproduces in Edge, see the repro steps below.
Since we use that feature to natively (as in "no Javascript shenanigans") highlight and scroll to different parts of a page we cannot accept the old highlighting to remain visible. Our current workaround is to perform a brief intermediate "clearing" navigation to the same URL without any text fragment at all, and then to the URL with the new text fragment. This clearing navigation gets rid of any highlighting, however it briefly scrolls the page to the top (as expected) before the following navigation highlights the actual new text fragment. This "flickering" is quite bad UX and also not the most stable approach, because since there is no completed handler for the WebView2 Navigate API, we need to temporarily register a NavigationCompleted event handler which continues with the actual navigation to the URL with the new text fragment and then remove it again.
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
129.0.2792.52
SDK Version
1.0.2792.45
Framework
Other
Operating System
Windows 11
OS Version
22631.4169
Repro steps
In Edge or WebView2 visit
https://www.wikipedia.org/#:~:text=Encyclopedia
Then in the same tab visit
https://www.wikipedia.org/#:~:text=The
Expectation: Only "The" should be highlighted.
Actual: "The" and "Encyclopedia" are highlighted.
Repros in Edge Browser
Yes, issue can be reproduced in the corresponding Edge version
Regression
Don't know
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: