Commit 8f7f18d0 authored by thakis@chromium.org's avatar thakis@chromium.org

mac: Completely disable history swiping on the ntp.

Requested by jeffreyc.

BUG=92786
TEST=Open tab, go somewhere, go back to ntp. Swipe like a madman,
nothing but paneswitchery should happen.


Review URL: http://codereview.chromium.org/7792013

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98766 0039d316-1c4b-4281-b951-d872f2087c98
parent e1548e1c
......@@ -221,15 +221,8 @@ var CardSlider = (function() {
if (e.wheelDeltaX == 0)
return;
var preventDefault = true;
// If the horizontal scroll didn't change cards (on the far right of
// the NTP), let the browser take a shot at the event as well.
if (this.currentCard === 0 && this.mouseWheelScrollAmount_ > 0)
preventDefault = false;
if (this.currentCard === this.cards_.length - 1 &&
this.mouseWheelScrollAmount_ < 0) {
preventDefault = false;
}
// Prevent OS X 10.7+ history swiping on the NTP.
e.preventDefault();
// Mac value feels ok with multitouch trackpads and magic mice
// (with physical scrollwheel, too), but not so great with logitech
......@@ -259,9 +252,6 @@ var CardSlider = (function() {
this.scrollClearTimeout_ =
setTimeout(this.clearMouseWheelScroll_.bind(this), 500);
}
if (preventDefault)
e.preventDefault();
},
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment