fix(docs): don't show mdbook help popup when using code editor

This commit is contained in:
WillLillis 2025-06-30 01:03:05 -04:00 committed by Will Lillis
parent a6cd6abcfb
commit 51a800b7df

View file

@ -134,8 +134,9 @@ window.initializePlayground = async (opts) => {
});
codeEditor.on('keydown', (_, event) => {
if (event.key === 'ArrowLeft' || event.key === 'ArrowRight') {
event.stopPropagation(); // Prevent mdBook from going back/forward
const key = event.key;
if (key === 'ArrowLeft' || key === 'ArrowRight' || key === '?') {
event.stopPropagation(); // Prevent mdBook from going back/forward, or showing help
}
});