Skip to content

Commit eb066fc

Browse files
committed
Updates to allow keydown and dblclick events to pass through to HTML elements as well
1 parent 9cf6b54 commit eb066fc

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ts/a11y/explorer/KeyExplorer.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,11 +1953,14 @@ export class SpeechExplorer
19531953
*/
19541954
protected addHtmlEvents() {
19551955
for (const html of Array.from(this.node.querySelectorAll('mjx-html'))) {
1956-
html.addEventListener('click', (event) => {
1956+
const stop = (event: Event) => {
19571957
if (html.contains(document.activeElement)) {
19581958
event.stopPropagation();
19591959
}
1960-
});
1960+
};
1961+
html.addEventListener('click', stop);
1962+
html.addEventListener('keydown', stop);
1963+
html.addEventListener('dblclick', stop);
19611964
}
19621965
}
19631966

0 commit comments

Comments
 (0)