WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
287055
toggle & beforetoggle event not fire when dialog state change
https://bugs.webkit.org/show_bug.cgi?id=287055
Summary
toggle & beforetoggle event not fire when dialog state change
Paul Li
Reported
2025-02-04 17:47:00 PST
Steps to reproduce the problem: 1. <dialog /> add toggle & beforetoggle event. 2. Call dialog.showModal(). 3. event not dispatch. What is the expected behavior ? 1. toggle & beforetoggle event should dispatch. What went wrong? 1. toggle & beforetoggle event not dispatch. Sample code: <dialog class="my-dialog"> this is a dialog </dialog> <script type="module"> const dialog = document.querySelector('.my-dialog'); dialog.addEventListener('beforetoggle', (event) => { console.log('beforetoggle event', event); } ); dialog.addEventListener('toggle', (event) => { console.log('toggle event', event); } ); dialog.addEventListener('close', (event) => { console.log('close event', event); } ); dialog.showModal(); </script>
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-02-11 17:47:28 PST
<
rdar://problem/144656524
>
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