Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f5ae761ea033b55bbb9da75f7c56fa9577bff530
      
https://github.com/WebKit/WebKit/commit/f5ae761ea033b55bbb9da75f7c56fa9577bff530
  Author: Aditya Keerthi <[email protected]>
  Date:   2024-11-12 (Tue, 12 Nov 2024)

  Changed paths:
    M Source/WebCore/page/Quirks.cpp

  Log Message:
  -----------
  [iOS] thesaurus.com: Unable to select text
https://bugs.webkit.org/show_bug.cgi?id=282946
rdar://138789765

Reviewed by Abrar Rahman Protyasha.

thesaurus.com runs script from player.anyclip.com, which adds a `touchstart`
listener to the document element, when the user agent does not contain Chrome
and Android. Inside this `touchstart` listener, the script calls
`window.getSelection().removeAllRanges()` after a 1 second delay. This results
in the selection getting cleared after the user attempts to select text.

Fix by adding a quirk to add Chrome and Android to the reported user agent in
this scenario. The quirk is scoped to thesaurus.com and the script from
player.anyclip.com to reduce risk, as the original intention of the `touchstart`
listener is unclear.

* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::scriptToEvaluateBeforeRunningScriptFromURL):

Canonical link: https://commits.webkit.org/286499@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to