We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bbaf00e commit cf588a1Copy full SHA for cf588a1
1 file changed
index.js
@@ -82,8 +82,8 @@ function allowClosingDialog(details: Element): boolean {
82
83
function onSummaryClick(event: Event): void {
84
if (!(event.currentTarget instanceof Element)) return
85
- const details = event.currentTarget.closest('details[open]')
86
- if (!details) return
+ const details = event.currentTarget.closest('details')
+ if (!details || !details.hasAttribute('open')) return
87
88
// Prevent summary click events if details-dialog-close was cancelled
89
if (!allowClosingDialog(details)) {
0 commit comments