aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorThomas Weinert <thomas@weinert.info>2017-08-12 13:38:46 +0200
committerThomas Weinert <thomas@weinert.info>2017-08-12 13:42:55 +0200
commitc0109d948f9d562899795abf15fae5c83c96f21e (patch)
tree7250e1dacef31b8f8bb8e0584531604a28046393 /plugin
parentbfd431a0c41c5d7954db6c6af5fb22d42e0b20e5 (diff)
downloadperl-software-in-gnu-guix-c0109d948f9d562899795abf15fae5c83c96f21e.tar
perl-software-in-gnu-guix-c0109d948f9d562899795abf15fae5c83c96f21e.tar.gz
Block F5 in speaker notes window, avoid disconnects
Diffstat (limited to 'plugin')
-rw-r--r--plugin/notes/notes.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugin/notes/notes.html b/plugin/notes/notes.html
index 4c5b799..9922a29 100644
--- a/plugin/notes/notes.html
+++ b/plugin/notes/notes.html
@@ -427,10 +427,16 @@
* 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.preventDefault();
+ }
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
} );