Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Space bar not working in form fields

I am using a template to build a one page portfolio site. The contact form is acting very strange. I cannot enter space in any of the contact fields.

I'm using the following jQuery plugins:

  • Gallerific
  • PikaChoose
  • Fancybox

When you focus in on the message field, it does not allow you to use any spaces. Any ideas on why the spacebar doesn't work?

like image 413
JCHASE11 Avatar asked Nov 29 '22 04:11

JCHASE11


1 Answers

jquery.gallerific.js implements a page-wide keydown handler that captures the spacebar and stops it from functioning.

934 if (this.enableKeyboardNavigation) {
935  $(document).keydown(function(e) {
936   var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
937   switch(key) {
938    case 32: // space
939     gallery.next();
940     e.preventDefault();
941     break;

If you scroll back to the gallery portion of the document while still focusing the form, you will notice that pressing the spacebar progresses to the next image.

like image 178
Sparr Avatar answered Dec 09 '22 20:12

Sparr