Bug 19127 - Find... interacts oddly with -webkit-user-select: none
Summary: Find... interacts oddly with -webkit-user-select: none
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on: 251709
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-19 13:06 PDT by Pam Greene (IRC:pamg)
Modified: 2023-02-03 16:05 PST (History)
4 users (show)

See Also:


Attachments
Entire body is -webkit-user-select: none (140 bytes, text/html)
2008-05-19 13:07 PDT, Pam Greene (IRC:pamg)
no flags Details
Second line is -webkit-user-select: none (173 bytes, text/html)
2008-05-19 13:19 PDT, Pam Greene (IRC:pamg)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pam Greene (IRC:pamg) 2008-05-19 13:06:36 PDT
Trying to find text on a page with only un-selectable text (-webkit-user-select: none) fails to find any of the matches.

Finding text on a page with mixed sections of un-selectable text  and normally selectable text behaves more oddly.  The first match in the section of un-selectable text is marked, but won't be highlighted when cycling through the matches: there will be one "pause" with no match highlighted.  Any other matches in that section won't be found at all.

To see the first problem, load the attached body-user-select.html, cmd-F, and look for the letter t.  notice "not found".

To see the second problem, load the attached user-select.html, cmd-F, and look for the letter t.  Notice that only one t in the middle line is marked. Then cmd-G repeatedly to cycle through the matches and notice the "pause" when the t on that middle line would have been the active match.
Comment 1 Pam Greene (IRC:pamg) 2008-05-19 13:07:32 PDT
Created attachment 21231 [details]
Entire body is -webkit-user-select: none
Comment 2 Pam Greene (IRC:pamg) 2008-05-19 13:19:44 PDT
Created attachment 21232 [details]
Second line is -webkit-user-select: none
Comment 3 mitz 2010-10-07 23:00:32 PDT
<rdar://problem/8081660>
Comment 4 Alexander Kahn 2011-01-26 08:58:19 PST
I'm running into this bug as well. I'm on OS X 10.6.6 using WebKit nightly r76640.
Comment 5 Aditya Keerthi 2023-02-03 16:05:22 PST
To resolve this on iOS, we simply need to fix 251709.

To resolve this on macOS, additional work is required, since macOS only uses the current selection for find (doesn't store ranges as done on iOS).