ipad – jQuery Mobile Responsive Panel和Textarea

ipad – jQuery Mobile Responsive Panel和Textarea,第1张

概述我有jQuery Mobile应用程序 http://gudulin.ru/test/problem.html. 页面加载后左侧面板打开: $( ‘#我的板’)面板( “打开”). 我在我的页面和@media css中添加了一个类ui-responsive-panel,因此我可以将面板和页面内容一起使用. 在笔记本电脑浏览器上一切正常,但iPad浏览器(Safari或其他任何东西)都存在问题.当左 我有jquery Mobile应用程序 http://gudulin.ru/test/problem.html.

页面加载后左侧面板打开:
$( ‘#我的板’)面板( “打开”).

我在我的页面和@media CSS中添加了一个类ui-responsive-panel,因此我可以将面板和页面内容一起使用.

在笔记本电脑浏览器上一切正常,但iPad浏览器(Safari或其他任何东西)都存在问题.当左面板打开并且我开始在文本区域中键入文本时,在输入任何符号后页面会跳转.当您开始在textarea的底部键入时(文本在键盘上向下)时会出现问题.

如果您没有明白我的意思,请观看视频:http://www.youtube.com/watch?v=Q6_kM_FshrQ.

如何重现:

>用iPad打开http://gudulin.ru/test/problem.html
>检查左侧面板是否已打开
>将任何内容写入文本区域并按几次输入按钮.

谢谢.

解决方法 我在jquery Mobile论坛 http://forum.jquery.com/topic/jquery-mobile-responsive-panel-and-textarea上粘贴了同样的问题并得到了 ishmaelaz的答案,所以我将它留在这里来关闭这个问题.

I have been fighting the same problem for months in a similar responsive panel layout,although with text fIElds. I found the cause last week,but haven’t had time to assemble a demonstration of the issue.

To work around the issue,edit jquery.mobile and look for _bindFixListener: (it’s line 8149 in 1.3.0). In this routine,comment out the throttledresize handler. Once you do that,jumPing stops.

As best I can tell,the issue here is that iOS sends resize events as you type input text fIElds. This is causing this handler to fire,which calls _positionPanel. _positionPanel trIEs to ensure that the panel is visible,presumably since this logic is aimed at a non-responsive scenario in which case the panel really always should be visible to be useful,but in the responsive scenario,it just leads to constant jumPing.

The keyboard being visible seems to be a crucial pIEce of the computations going wrong,as I’ve found that if you add a tall div to the bottom of the page to make it longer,then this logic doesn’t trigger,seemingly since the bottom of the page isn’t “under” the keyboard. I haven’t tested that as far,though,as once I found a way to make the jump stop,I was happy.

总结

以上是内存溢出为你收集整理的ipad – jQuery Mobile Responsive Panel和Textarea全部内容,希望文章能够帮你解决ipad – jQuery Mobile Responsive Panel和Textarea所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1082593.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-27
下一篇2022-05-27

发表评论

登录后才能评论

评论列表(0条)

    保存