aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2017-12-04 13:46:04 +0100
committerGitHub <noreply@github.com>2017-12-04 13:46:04 +0100
commitedc9c0a8fdb0b76dcb07fe9c8411debfcbb08ee9 (patch)
treed01aa182cf48596ca4b0afaeb14d35adb5694dec /plugin
parent09471a050848a20bcf199e7c58a014b6752cfa89 (diff)
parentc0109d948f9d562899795abf15fae5c83c96f21e (diff)
downloadperl-software-in-gnu-guix-edc9c0a8fdb0b76dcb07fe9c8411debfcbb08ee9.tar
perl-software-in-gnu-guix-edc9c0a8fdb0b76dcb07fe9c8411debfcbb08ee9.tar.gz
Merge pull request #1958 from ThomasWeinert/feature/block_f5_in_notes
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 ] }), '*' );
} );