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

This commit is contained in:
Marcono1234 2025-11-12 15:55:28 +01:00 committed by Will Lillis
parent 7657cc9d35
commit 12a31536e1

View file

@ -146,8 +146,9 @@ window.initializePlayground = async (opts) => {
});
queryEditor.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
}
});