问题描述
我正在将JQueryMobile用于我的移动网站.我有一个固定的页脚,当您按共享"按钮时,该页脚会隐藏并显示.当您开始滚动时,它便消失了.我也有评论框.
I'm using JQueryMobile for my mobile site. I've got a fixed footer that hides and shows when you press the "Share" button. It then disappears when you start scrolling. I've also got comment boxes.
要重新创建错误:[已删除](使用移动设备或SIM卡)
To recreate the error:[removed] (use a mobile device or sim)
- 向下滚动并单击第一个评论按钮(语音气泡+'3')
- 点击文本区域
- 点击完成"以取消焦点
- 单击第一个评论按钮右侧的共享".
您将看到页脚短暂出现,然后下降到页面底部.如果您在仍然专注于文本区域的情况下单击共享",则根本不会显示页脚.
You'll see the footer briefly appear, and then it drops to the bottom of the page. If you click on 'Share' while still focused on the textarea, the footer just doesn't appear at all.
只要加载页面,只需单击共享"按钮,您就可以重新创建我想做的事情.
You can recreate what I WANT to happen by simply clicking on the 'Share' button as soon as the page loads.
发生了什么事,我该如何解决?我已经尝试过解决文本不集中的问题,但我无能为力.
What's going on there and how can I fix it? I've tried to do various things upon text unfocus, but I can't get anything to work.
推荐答案
我已经通过不将页脚隐藏在焦点上来解决此问题.这不是一个完美的解决方案,可能是JQuery中的错误.
I've hacked a fix for this by not hiding the footer upon focus. It's not a perfect solution, it might be a bug in JQuery.
$("[data-role=footer]").fixedtoolbar({ hideDuringFocus: "input, select" });
这篇关于JQueryMobile-输入焦点后固定页脚不固定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!