1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-08-05 14:17:56 +02:00

add focus controller, manages keyboard focus across multiple embedded decks

This commit is contained in:
Hakim El Hattab
2020-05-11 09:15:02 +02:00
parent 57107ebe4c
commit 664beff715
6 changed files with 125 additions and 6 deletions

View File

@@ -151,6 +151,12 @@ export default class Keyboard {
return true;
}
// If keyboardCondition is set, only capture keyboard events
// for embedded decks when they are focused
if( config.keyboardCondition === 'focused' && !this.Reveal.isFocused() ) {
return true;
}
// Shorthand
let keyCode = event.keyCode;