WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
191714
Input element gains focus when a selectstart event listener on document prevents the default action
https://bugs.webkit.org/show_bug.cgi?id=191714
Summary
Input element gains focus when a selectstart event listener on document preve...
bugged.dev
Reported
2018-11-15 14:19:03 PST
When using a preventDefault in a selectstart handler, input nodes on the page will receive focus while the pointer is down and the pointer hovers over the input node. This behavior is reproducible here:
https://codepen.io/psant/pen/oQwxgx
This behavior is not reproducible in Chrome, Firefox, or Edge Thanks
Attachments
Reduction
(437 bytes, text/html)
2018-11-19 22:36 PST
,
Ryosuke Niwa
no flags
Details
Fixes the bug
(7.40 KB, patch)
2018-11-20 01:39 PST
,
Ryosuke Niwa
koivisto
: review+
ews-watchlist
: commit-queue-
Details
Formatted Diff
Diff
Archive of layout-test-results from ews125 for ios-simulator-wk2
(2.54 MB, application/zip)
2018-11-20 12:01 PST
,
EWS Watchlist
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-11-19 15:10:18 PST
<
rdar://problem/46174389
>
Ryosuke Niwa
Comment 2
2018-11-19 22:36:07 PST
Created
attachment 355312
[details]
Reduction
Ryosuke Niwa
Comment 3
2018-11-20 01:08:24 PST
The problem here is that we keep firing selectstart after the mouse drag had already started when selectstart had been canceled. No other browser does this so we just need to fire it once and set m_mouseDownMayStartSelect to false thereafter.
Ryosuke Niwa
Comment 4
2018-11-20 01:39:01 PST
Created
attachment 355325
[details]
Fixes the bug
Antti Koivisto
Comment 5
2018-11-20 05:16:44 PST
Comment on
attachment 355325
[details]
Fixes the bug View in context:
https://bugs.webkit.org/attachment.cgi?id=355325&action=review
> Source/WebCore/ChangeLog:15 > + Fixed the bug by not firing selectstart if the default action ahd been prevented by the initial firing
'had'
EWS Watchlist
Comment 6
2018-11-20 12:01:15 PST
Comment on
attachment 355325
[details]
Fixes the bug
Attachment 355325
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
https://webkit-queues.webkit.org/results/10090007
New failing tests: media/no-fullscreen-when-hidden.html
EWS Watchlist
Comment 7
2018-11-20 12:01:17 PST
Created
attachment 355354
[details]
Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Ryosuke Niwa
Comment 8
2018-11-20 15:56:37 PST
I don't think the iOS test failure is related to my patch.
Ryosuke Niwa
Comment 9
2018-11-20 16:12:27 PST
Committed
r238409
: <
https://trac.webkit.org/changeset/238409
>
Lucas Forschler
Comment 10
2019-02-06 09:18:25 PST
Mass move bugs into the DOM component.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug