fix(docs): don't show mdbook help popup when using code editor
This commit is contained in:
parent
a6cd6abcfb
commit
51a800b7df
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue