使用jscrollpane时出现类型错误
伙计们,这个简直要了我的命……
我在网站上的很多地方都使用了 jscrollpane,一切都很好。在一个(具有讽刺意义的简单页面)上,我有一些编辑字段恰好位于应用了 jscrollpane 的 div 中。
滚动就好了。页面和一切都很好。问题是 safari、chrome 和 firefox 报告以下错误:
TypeError: 'undefined' is not a function (evaluating 'c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']")')
in jquery-1.5.min.js:16
当焦点位于编辑字段上(我实际上将表单精简为一个字段)并且按下任意键时,会出现此错误。因此,如果我去编辑该字段,并且按下 Alt/Option、Command、ctrl 键,就会生成该错误,并且其计数器会增加。按 ESC 会使错误计数器跳动很多。
如果我删除 jscrollpane 并让操作系统显示其滚动条,那么错误就会消失!
我已经更改了编辑框的名称、大小、id、类……没有任何区别:(
我真的对此感到困惑。有什么想法、线索吗???
谢谢
Folks, this one is killing me....
I'm using jscrollpane in a lot of places on my site and all is fine. On one (ironically simple page), i have some edit fields that happen to be in a div that has jscrollpane applied to it.
Scrolling is fine. the page and everything is fine. The problem is that safari, chrome and firefox report the following error:
TypeError: 'undefined' is not a function (evaluating 'c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']")')
in jquery-1.5.min.js:16
this error shows up when the focus is on the edit field (i actually stripped the form down to ONE field) and any key is pressed. So if i go to edit the field and i hit even the Alt/Option, Command, ctrl keys, that error is generated and its counter goes up. hitting ESC makes the error counter jumps by a lot.
if i remove jscrollpane and let the OS show its scrollbars, then the error disappears!!!
I have changed the name, size, id, class,.... of the edit box with no difference :(
I'm really puzzled by this one. Any thoughts, clues???
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来enableKeyboardNavigation 是罪魁祸首。在设置中将其设置为 false 一切都很好
it looks like enableKeyboardNavigation is the culprit. Make it false in settings and all is well