空格键不在表单域中工作 [英] Space bar not working in form fields

查看:155
本文介绍了空格键不在表单域中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用模板来构建单页组合网站。联系表单的行为非常奇怪。我无法在任何联系人栏中输入空格。

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.

我使用以下jQuery插件:

I'm using the following jQuery plugins:


  • Gallerific
  • >
  • PikaChoose

  • Fancybox

  • 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?

推荐答案

jquery.gallerific.js实现了一个页面范围的keydown处理程序,

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.

这篇关于空格键不在表单域中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆