WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
311741
Nesting requestClose() shouldn't fire multiple cancel events
https://bugs.webkit.org/show_bug.cgi?id=311741
Summary
Nesting requestClose() shouldn't fire multiple cancel events
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
Add attachment
proposed patch, testcase, etc.
Luke Warlow
Comment 1
2026-04-08 11:04:22 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/62283
Radar WebKit Bug Importer
Comment 2
2026-04-15 11:01:14 PDT
<
rdar://problem/174850509
>
EWS
Comment 3
2026-05-14 06:49:06 PDT
Committed
313239@main
(6053a426c6d4): <
https://commits.webkit.org/313239@main
> Reviewed commits have been landed. Closing PR #62283 and removing active labels.
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