开发者

How to prevent webkit from going back in history when scrolling horizontally?

The title should say it all. Chrome + safari goes back in history when scrolling to the left using a trackpad, very annoying if you expect a horizontal scroll. I was hoping to be able to disable it using:

document.addEventListener('mou开发者_JS百科sewheel', function(e) {
    e.preventDefault();
});

But that didn’t work. Neither did a return false; from the handler. I think this is a OSX Lion specific issue, but I’m not sure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜