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.
精彩评论