Thinkpad 使用edge浏览器 触摸板滑动不触发wheel事件.
// 绑定事件代码, 源码来源fullpage.js中
(function(){
var prefix = '';
var _addEventListener;
if (window.addEventListener){
_addEventListener = "addEventListener";
}else{
_addEventListener = "attachEvent";
prefix = 'on';
}
//cheks for passive event support
var g_supportsPassive = false;
try {
var opts = Object.defineProperty({}, 'passive', {
get: function() {
g_supportsPassive = true;
}
});
window.addEventListener("testPassive", null, opts);
window.removeEventListener("testPassive", null, opts);
} catch (e) {}
// detect available wheel event
var support = 'onwheel' in document.createElement('div') ? 'wheel' : // Modern browsers support "wheel"
document.onmousewheel !== undefined ? 'mousewheel' : // Webkit and IE support at least "mousewheel"
'DOMMouseScroll'; // let's assume that remaining browsers are older Firefox
var passiveEvent = g_supportsPassive ? {passive: false }: false;
if(support == 'DOMMouseScroll'){
document[ _addEventListener ](prefix + 'MozMousePixelScroll', scrollFunc, passiveEvent);
} else{
document[ _addEventListener ](prefix + support, scrollFunc, passiveEvent);
}
})();
现在的效果是, 除了Thinkpad Edge浏览器中触摸板不能触发, 其它都正常.
我就想知道, Edge中触摸板是否有单独的事件.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好像是微软的BUG链接