关于官方jScrollPane的观察整页滚动演示 ...
An observation regarding the official jScrollPane full page scroll demo...
单击并拖动控制窗口的大型垂直滚动条.当您单击并拖动滚动条,并且鼠标意外离开浏览器窗口时,我注意到以下行为:
Click and drag the large vertical scrollbar controlling the window. I've noticed the following behavior when you click+drag the scrollbar and the mouse accidentally leaves the browser window:
- Safari(XP):即使将鼠标拖动到浏览器窗口的外面,滚动条也会响应.似乎无法打破它.很棒.
- FF4(XP):滚动条停止响应.当鼠标再次进入时,它会再次成功响应(您无需单击即可开始再次拖动).有点烦人.
- IE8(XP):滚动条停止响应.当鼠标再次进入时,它也没有响应(您必须再次单击以拖动).这是三者中最糟糕的.
因此Safari(我想是Safari,和Webkit)可以完美地处理鼠标在窗口外的移动.甚至有可能使IE和FF具有类似的行为,还是Trident和Gecko引擎的那些局限性?
So Safari (and Webkit, I presume) handles mouse movement outside the window perfectly. Is it even possible to get IE and FF to behave similarly, or are those limitations of the Trident and Gecko engines?
推荐答案[我最初回答 a完全不同的问题在这里是错误的,因此请编辑以回答正确的问题]
[I originally answered a completely different question here by mistake so editing to answer the correct question]
jScrollPane对此无能为力.我做了一些研究,但是当鼠标离开浏览器窗口时,触发启动/鼠标事件时,不同的浏览器的行为似乎有所不同.这使得很难在jScrollPane中实现一致的行为(如果您在iframe上使用全身滚动,则当鼠标离开iframe时也会发生此问题.)
There is very little jScrollPane can do about this. I did a little research but it seems that different browsers behave differently when it comes to triggering rollout/mouseout events when the mouse leaves the browser window. This makes it hard to implement a consistent behaviour within jScrollPane (the problem also occurs when the mouse leaves an iframe if you use full body scroll on an iframe).
我认为可能是出于安全原因,浏览器没有报告鼠标在窗口外的移动,因此,对此几乎无能为力:(
I think there are probably security reasons for browsers not reporting mouse movement outside of the window so there is probably very little that can be done about this :(
更多推荐
即使鼠标离开浏览器窗口也滚动?
发布评论