From a41d28cfdbdcbedc004037647dc8c8829c627662 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Emonet?= Date: Wed, 6 May 2015 22:43:13 +0200 Subject: [PATCH] ignoring (arrow) keys when the ALT key is pressed Without this patch, deck.js was capturing ALT+arrow events which are use by some people to navigate their browsing history (back/forward). --- core/deck.core.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/deck.core.js b/core/deck.core.js index a8adefe..3979627 100644 --- a/core/deck.core.js +++ b/core/deck.core.js @@ -185,6 +185,11 @@ that use the API provided by core. ].join(', '); $document.unbind('keydown.deck').bind('keydown.deck', function(event) { + if (event.altKey) { + // ignore events when the ALT key is down + // NB: browsers use ALT+arrow to navigate history + return; + } var isNext = event.which === options.keys.next; var isPrev = event.which === options.keys.previous; isNext = isNext || $.inArray(event.which, options.keys.next) > -1; -- 2.11.4.GIT