summaryrefslogtreecommitdiffhomepage
path: root/plugin/notes/notes.html
diff options
context:
space:
mode:
authorSean Parent2018-04-13 07:55:02 -0700
committerGitHub2018-04-13 07:55:02 -0700
commit97c1a0ecc1bf729dbe227ed0a3af0bfd3bc38613 (patch)
tree4fd0f338f0f58a46f213daaaa4744df4980bf45b /plugin/notes/notes.html
parent64b2a27455240e57c2cc1a90300391a3c3b91e28 (diff)
parent397feab8b4be5f8445ebb05808b507248188d4fe (diff)
Merge branch 'dev' into master
Diffstat (limited to 'plugin/notes/notes.html')
-rw-r--r--plugin/notes/notes.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 4c5b799..5b75d73 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -427,10 +427,17 @@
* Forward keyboard events to the current slide window.
* This enables keyboard events to work even if focus
* isn't set on the current slide iframe.
+ *
+ * Block F5 default handling, it reloads and disconnects
+ * the speaker notes window.
*/
function setupKeyboard() {
document.addEventListener( 'keydown', function( event ) {
+ if( event.keyCode === 116 || ( event.metaKey && event.keyCode === 82 ) ) {
+ event.preventDefault();
+ return false;
+ }
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
} );