垂直滚动被Hammer.js阻止 [英] vertical scrolling blocked by Hammer.js

查看:353
本文介绍了垂直滚动被Hammer.js阻止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Intel XDK(内部版本2727)制作一个应用程序,现在我的问题是,当我的列表超过屏幕尺寸时,我无法垂直滚动.我将问题归结为Hammer.js.该插件似乎用于侧边栏.所以我试图将源注释掉,瞧,它正在工作.但是我需要侧边栏,因此也需要Hammer.js.经过研究,结果发现其他人也有同样的问题,而最常见的解决方案似乎是overflow-y: scroll;,我也尝试过,但是没有运气.因此,如何在不进入Hammer.js的源数据的情况下解决此问题,例如在CSS工作表中进行例外处理?

i am trying to make an app with Intel XDK (build 2727) and right now my problem is that i can't scroll vertical when i have a list which exceeds the screen size. i tracked the problem down to Hammer.js. This plug-in seems to be used for the sidebar. So i tried to comment the source out and voila, it is working. But I need the sidebar and therefore Hammer.js. After research it turned out that others are having the same issue and the most common solution for this seems to be overflow-y: scroll; i tried it too but had no luck. so, how can i solve this problem without getting into the source data of Hammer.js but for example by making an exception at the CSS sheets?

推荐答案

好,我找到了(部分)解决方案.在swipe-hammer.js中,将".upage"连接起来以全方位锤击.将其更改为DIRECTIONS_HORIZONTAL,目前已解决了该问题.主要问题是因为Hammer不仅与侧边栏相连,而且与整个页面都挂钩.不知道这是否是正确的方法.

Ok I found a (partial) solution. At swipe-hammer.js ".upage" is hooked up to hammer in all directions. Changed it to DIRECTIONS_HORIZONTAL and that solved the problem for now. The main problem is because the Hammer is hooked up for the whole page and not only the sidebar. Don't know if this is the right way to do it.

无论如何,非常感谢@Thomas给我的提示.

Anyway, thanks very much @Thomas for giving me the hint.

这篇关于垂直滚动被Hammer.js阻止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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