aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
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 ] }), '*' );
} );