Bug 263621 - Log to the console when preventDefault() is called inside a passive event listener
Summary: Log to the console when preventDefault() is called inside a passive event lis...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Abrar Rahman Protyasha
URL:
Keywords: BrowserCompat, InRadar
Depends on:
Blocks:
 
Reported: 2023-10-24 15:51 PDT by Abrar Rahman Protyasha
Modified: 2023-11-06 18:10 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Abrar Rahman Protyasha 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.
Comment 1 Radar WebKit Bug Importer 2023-10-24 15:52:05 PDT
<rdar://problem/117440707>
Comment 3 Abrar Rahman Protyasha 2023-10-24 15:59:14 PDT
This change should also bring us to parity with behavior in Blink/Gecko.
Comment 4 Abrar Rahman Protyasha 2023-10-24 16:12:20 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19514