Commit 96117b0a authored by Vadim Makeev's avatar Vadim Makeev

Merge pull request #141 from Patternslib/issue-141-key-hijack

Shower breaks input elements on a page
parents aec32d71 f33e1c29
......@@ -852,8 +852,10 @@ window.shower = window.shower || (function(window, document, undefined) {
case 37: // Left
case 72: // H
case 75: // K
if (shower.isSlideMode()) {
e.preventDefault();
shower._turnPreviousSlide();
}
break;
case 34: // PgDown
......@@ -861,25 +863,32 @@ window.shower = window.shower || (function(window, document, undefined) {
case 39: // Right
case 76: // L
case 74: // J
if (shower.isSlideMode()) {
e.preventDefault();
shower._turnNextSlide();
}
break;
case 36: // Home
if (shower.isSlideMode()) {
e.preventDefault();
shower.first();
}
break;
case 35: // End
if (shower.isSlideMode()) {
e.preventDefault();
shower.last();
}
break;
case 9: // Tab = +1; Shift + Tab = -1
case 32: // Space = +1; Shift + Space = -1
if (shower.isSlideMode()) {
e.preventDefault();
shower[e.shiftKey ? '_turnPreviousSlide' : '_turnNextSlide']();
}
break;
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment