diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2017-12-04 13:46:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-04 13:46:04 +0100 |
commit | edc9c0a8fdb0b76dcb07fe9c8411debfcbb08ee9 (patch) | |
tree | d01aa182cf48596ca4b0afaeb14d35adb5694dec /plugin/notes | |
parent | 09471a050848a20bcf199e7c58a014b6752cfa89 (diff) | |
parent | c0109d948f9d562899795abf15fae5c83c96f21e (diff) | |
download | perl-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/notes')
-rw-r--r-- | plugin/notes/notes.html | 6 |
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 ] }), '*' ); } ); |