Bug 311741

Summary: Nesting requestClose() shouldn't fire multiple cancel events
Product: WebKit Reporter: Luke Warlow <lwarlow>
Component: DOMAssignee: Luke Warlow <lwarlow>
Status: NEW    
Severity: Normal    
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://github.com/web-platform-tests/wpt/pull/59053

Luke Warlow
Reported 2026-04-08 11:00:54 PDT
```html <dialog id="dialog">Some Dialog Content</dialog> <script> dialog.showModal(); dialog.oncancel = () => { dialog.requestClose(); }; dialog.requestClose(); </script> ``` This leads to a RangeError: Maximum call stack size exceeded. in WebKIt. The spec prevents this through CloseWatcher machinery, we should add a guard to prevent this until CloseWatchers are finished and integrated with dialog.
Attachments
Luke Warlow
Comment 1 2026-04-08 11:04:22 PDT
Note You need to log in before you can comment on or make changes to this bug.