i'm using jquery gallerific a long time ago (6 months) and recently i started to realize there is a problem with the photo gallery, when opened the gallery and then close it and then try to write something in an input type="text" i cannot move through it. The cursor in any input text stays locked and just have to use the mouse to go to start line and end line because START and END key are locked also. i'll put the printscreen to show you what the problem is. Whatever comment would be good!
aaahttp://img844.imageshack.us/img844/7748/pantallazohz.png
and then the plugin crash making the keyboard not allow to move through( including the key start and end-page):
http://img809.imageshack.us/img809/9133/pantall开发者_如何转开发azo1w.png
if i've not been clear let me know please my best regards
This works for me:
// Setup Keyboard Navigation
if (this.enableKeyboardNavigation) {
$(document).keydown(function(e) {
var target = e.target || e.srcElement; // hack
//disable navigation on an input editable element
if (target && target.type) return true;
var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
switch(key) {
case 32: // space
gallery.next();
e.preventDefault();
break;
case 33: // Page Up
gallery.previousPage();
e.preventDefault();
break;
case 34: // Page Down
gallery.nextPage();
e.preventDefault();
break;
case 35: // End
gallery.gotoIndex(gallery.data.length-1);
e.preventDefault();
break;
case 36: // Home
gallery.gotoIndex(0);
e.preventDefault();
break;
case 37: // left arrow
gallery.previous();
e.preventDefault();
break;
case 39: // right arrow
gallery.next();
e.preventDefault();
break;
}
});
}
well it seems a bug in all galleriffic that enables users handle keyboard navigation. I figure it put from this post http://code.google.com/p/galleriffic/issues/detail?id=119 and after that i made a toggle comment from line 934 to 969 and it's all
i Hope this information would help someone
精彩评论