Merge pull request #141 from Patternslib/issue-141-key-hijack
Shower breaks input elements on a page
This commit is contained in:
commit
96117b0af7
31
shower.js
31
shower.js
|
@ -852,8 +852,10 @@ window.shower = window.shower || (function(window, document, undefined) {
|
||||||
case 37: // Left
|
case 37: // Left
|
||||||
case 72: // H
|
case 72: // H
|
||||||
case 75: // K
|
case 75: // K
|
||||||
e.preventDefault();
|
if (shower.isSlideMode()) {
|
||||||
shower._turnPreviousSlide();
|
e.preventDefault();
|
||||||
|
shower._turnPreviousSlide();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 34: // PgDown
|
case 34: // PgDown
|
||||||
|
@ -861,25 +863,32 @@ window.shower = window.shower || (function(window, document, undefined) {
|
||||||
case 39: // Right
|
case 39: // Right
|
||||||
case 76: // L
|
case 76: // L
|
||||||
case 74: // J
|
case 74: // J
|
||||||
e.preventDefault();
|
if (shower.isSlideMode()) {
|
||||||
shower._turnNextSlide();
|
e.preventDefault();
|
||||||
|
shower._turnNextSlide();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 36: // Home
|
case 36: // Home
|
||||||
e.preventDefault();
|
if (shower.isSlideMode()) {
|
||||||
shower.first();
|
e.preventDefault();
|
||||||
|
shower.first();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 35: // End
|
case 35: // End
|
||||||
e.preventDefault();
|
if (shower.isSlideMode()) {
|
||||||
|
e.preventDefault();
|
||||||
shower.last();
|
shower.last();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9: // Tab = +1; Shift + Tab = -1
|
case 9: // Tab = +1; Shift + Tab = -1
|
||||||
case 32: // Space = +1; Shift + Space = -1
|
case 32: // Space = +1; Shift + Space = -1
|
||||||
e.preventDefault();
|
if (shower.isSlideMode()) {
|
||||||
shower[e.shiftKey ? '_turnPreviousSlide' : '_turnNextSlide']();
|
e.preventDefault();
|
||||||
|
shower[e.shiftKey ? '_turnPreviousSlide' : '_turnNextSlide']();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue