AltynbekKZ / galleriffic

Automatically exported from code.google.com/p/galleriffic
0 stars 1 forks source link

problem with spaces in textareas-home-end-arrows with the initialize of gallerific #147

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. just add a textarea to the page with the initialize.js added, and try to 
push spacebar and get a space - doesn't work. Try to push home or end on your 
keyboard - doesnt work either

What is the expected output? What do you see instead?
nothing, it doesnt work

What version of the product are you using? On what operating system?
2.0.1

Please provide any additional information below.

Original issue reported on code.google.com by nele.steenput@gmail.com on 23 Aug 2010 at 10:28

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
These keyboard controls can be turned off by setting the option 
enableKeyboardNavigation to false.  Better to turn it off than remove it.

Original comment by CWhalen...@gmail.com on 16 Sep 2010 at 8:30

GoogleCodeExporter commented 8 years ago
Thx, it's work. The best is tu turn off : " enableKeyboardNavigation: false, "

Original comment by john...@gmail.com on 17 Feb 2011 at 11:06

GoogleCodeExporter commented 8 years ago
hi

I have found a solution to stop the galleriffic keyboards controls when you are 
on an input editable element :

        // Setup Keyboard Navigation
        if (this.enableKeyboardNavigation) {
            $(document).keydown(function(e) {

            var target = e.target || e.srcElement;          // hack vincent3569
            if (target && target.type) return true;         //disable navigation on an input editable element

                var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
                switch(key) {
                    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;
                }
            });
        }

it works fine for me !!

Original comment by VBourga...@gmail.com on 7 Sep 2011 at 8:12

GoogleCodeExporter commented 8 years ago
setting enableKeyboardNavigation to false is the neat the simple solution. 
thanks

Original comment by artsofne...@gmail.com on 16 Sep 2011 at 5:48

GoogleCodeExporter commented 8 years ago
great hack

Original comment by hawk...@gmail.com on 6 Jun 2012 at 2:11

GoogleCodeExporter commented 8 years ago
Remove:

case 32: // space
gallery.next();
e.preventDefault();
break;

Lines: 938,939,940,941 from jquery.galleriffic

Original comment by autop...@gmail.com on 27 Jun 2013 at 2:41