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 287178e commit 54a858cCopy full SHA for 54a858c
test/test.js
@@ -121,6 +121,18 @@ describe('details-menu element', function() {
121
assert(!details.open, 'details toggles closed')
122
})
123
124
+ it('allow propagation on escape if details is closed', function() {
125
+ const details = document.querySelector('details')
126
+ const summary = details.querySelector('summary')
127
+
128
+ document.addEventListener('keydown', event => {
129
+ if (event.key === 'Escape') summary.textContent = 'Propagated'
130
+ })
131
132
+ summary.dispatchEvent(new KeyboardEvent('keydown', {key: 'Escape', bubbles: true}))
133
+ assert.equal(summary.textContent, 'Propagated')
134
135
136
it('updates the button label with text', function() {
137
const details = document.querySelector('details')
138
const summary = details.querySelector('summary')
0 commit comments