Commit graph

2 commits

Author SHA1 Message Date
Eric Huss
4fb647c760 Fix global keypress handling with shadow DOM elements
This fixes an issue where global keypresses were being caught when they
shouldn't when there is a shadow DOM element with focus. This can happen
if the user has included their own extensions. Arguably the extension
should do a stopPropagation, but they don't always do that. I think this
is relatively safe way to approach this.

Fixes https://github.com/rust-lang/mdBook/issues/2507
2026-05-04 11:51:32 -07:00
Eric Huss
22f3035df0 Add a test for global keypress with shadow-dom elements
This is a regression test for
https://github.com/rust-lang/mdBook/issues/2507.
2026-04-27 15:31:04 -07:00