WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
263621
Log to the console when preventDefault() is called inside a passive event listener
https://bugs.webkit.org/show_bug.cgi?id=263621
Summary
Log to the console when preventDefault() is called inside a passive event lis...
Abrar Rahman Protyasha
Reported
2023-10-24 15:51:54 PDT
The DOM standard makes this recommendation: ``` There are scenarios where invoking preventDefault() has no effect. User agents are encouraged to log the precise cause in a developer console, to aid debugging. ``` We should respect that for the case when preventDefault() is called on an event inside a passive event listener, since that has no effect and might not be what the developer is expecting.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2023-10-24 15:52:05 PDT
<
rdar://problem/117440707
>
Abrar Rahman Protyasha
Comment 2
2023-10-24 15:58:16 PDT
(In reply to Abrar Rahman Protyasha from
comment #0
)
> The DOM standard makes this recommendation:
Recommendation is here:
https://dom.spec.whatwg.org/#set-the-canceled-flag:~:text=There%20are%20scenarios%20where%20invoking%20preventDefault()%20has%20no%20effect.%20User%20agents%20are%20encouraged%20to%20log%20the%20precise%20cause%20in%20a%20developer%20console%2C%20to%20aid%20debugging
.
Abrar Rahman Protyasha
Comment 3
2023-10-24 15:59:14 PDT
This change should also bring us to parity with behavior in Blink/Gecko.
Abrar Rahman Protyasha
Comment 4
2023-10-24 16:12:20 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/19514
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