简体   繁体   English

jScrollPane无法在Windows 8触摸屏笔记本电脑中滚动浏览器上的内容

[英]jScrollPane Unable to scroll the content on Browsers in Windows 8 touch screen laptop

I am using jQuery jScrollPane plugin in my website, It is working fine in normal PC browsers and iPad, Android tablets.. 我在我的网站上使用jQuery jScrollPane插件,它在普通的PC浏览器和iPad,Android平板电脑上工作正常。

But when I open my website on Windows 8 touch screen Laptop I am unable to scroll the page with touch gestures like in iPad or Android tablet. 但是,当我在Windows 8触摸屏笔记本电脑上打开我的网站时,我无法使用iPad或Android平板电脑等触摸手势滚动页面。

I tried this demo website( http://jscrollpane.kelvinluck.com/themes/lozenge/ ) also, I am unable to scroll the content with touch gestures. 我也试过这个演示网站( http://jscrollpane.kelvinluck.com/themes/lozenge/ ),我无法用触摸手势滚动内容。

To scroll the page I have to go to scrollbar and drag it to left/right. 要滚动页面,我必须转到滚动条并向左/向右拖动。 Earlier with default scroll bar I am able to scroll the page with touch gestures now I can't with jScrollPane. 早期使用默认滚动条我可以使用触摸手势滚动页面,现在我无法使用jScrollPane。

I am able to scroll the content(demo and my site, in windows8 Device) in Chrome but not in IE and FireFox 我能够在Chrome中滚动内容(演示和我的网站,在windows8设备中),但不能在IE和FireFox中滚动

Is this a known Issue? 这是一个已知的问题? How can I fix this? 我怎样才能解决这个问题?

Is jScrollPane supports only webkit browsers for touch gestures? jScrollPane是否仅支持用于触摸手势的webkit浏览器?

If yes How can we make it to work on all browsers especially Firefox and IE? 如果是,我们怎样才能让它适用于所有浏览器,尤其是Firefox和IE?

Update: 更新:

As I mentioned in comment for Bruno answer, We already tried using following styles to that division.. But no luck 正如我在评论Bruno的回答中提到的那样,我们已经尝试过使用以下样式来进行分类......但是没有运气

.scroll-pane{
overflow-x:scroll; 
-ms-touch-action: pan-x;    
}

and 

.scroll-pane{
overflow-x: scroll;
-ms-scroll-snap-type: mandatory;
-ms-scroll-snap-points-x: snapInterval(0%, 100%);

}

Add this styles to the body tag of CSS. 将此样式添加到CSS的body标记中。

overflow-x:scroll ; 
-ms-touch-action: pan-x;

It worked for me. 它对我有用。 Hope this helps you as well. 希望这对你也有帮助。 Best of Luck. 最好的运气。

Yes, jScollPane only cares for webkit touch events (They were the only events atm) but now MS introduced the Pointer events that while are fairly easy to detect many devs don't do this. 是的,jScollPane只关心webkit触摸事件(它们是唯一的事件atm)但现在MS引入了Pointer事件 ,虽然很容易检测到许多开发人员不这样做。 One other example that comes to mind is the FlexSlider plugin, that also used to only detect touchend, touchstart, etc. 想到的另一个例子是FlexSlider插件,它也用于仅检测touchend,touchstart等。

If you want to make jScollPane work in Win8 you might want to modify the source and adapt it to detect MS Pointer events. 如果您想让jScollPane在Win8中工作,您可能需要修改源并调整它以检测MS指针事件。

I add a MsPointerEvents ( http://goo.gl/MnEIh ) to a jquery.jscrollpane.js: 我将一个MsPointerEvents( http://goo.gl/MnEIh )添加到jquery.jscrollpane.js:

https://raw.github.com/karacas/jScrollPane/9fe8872f6e2438a87847e3d01b46648f06d15fc1/script/jquery.jscrollpane.js https://raw.github.com/karacas/jScrollPane/9fe8872f6e2438a87847e3d01b46648f06d15fc1/script/jquery.jscrollpane.js

Hope it works, sorry, but i can't tested this, because i don't have w8. 希望它有效,对不起,但我无法测试这个,因为我没有w8。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM