1
0
Fork 0

prevent cmd+r in notes window since reloading breaks the view #1958

This commit is contained in:
Hakim El Hattab 2017-12-04 13:57:19 +01:00
parent edc9c0a8fd
commit 7a0b4a56f9
1 changed files with 2 additions and 1 deletions

View File

@ -434,8 +434,9 @@
function setupKeyboard() { function setupKeyboard() {
document.addEventListener( 'keydown', function( event ) { document.addEventListener( 'keydown', function( event ) {
if (event.keyCode === 116) { if( event.keyCode === 116 || ( event.metaKey && event.keyCode === 82 ) ) {
event.preventDefault(); event.preventDefault();
return false;
} }
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' ); currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
} ); } );