-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scrolling of the text too fast in chrome #2
Comments
I have also found it to be too fast, at least in the webkit based browsers I use. |
Scrolling in Chrome now feels more normal, but Safari is still very fast. Was something done specifically to fix Chrome, and could that work for Safari as well? |
I did not change the code but I guess they change the scroll speed in Chrome. Will see what a good scroll factor is for Safari. https://github.com/ajaxorg/pilot/blob/master/lib/pilot/event.js#L174 |
the relevant qooxdoo code as reference getWheelDelta : qx.core.Variant.select("qx.client",
{
"default" : function() {
return -(this._native.wheelDelta / 40);
},
"gecko" : function() {
return this._native.detail;
},
"webkit" : function()
{
if (qx.bom.client.Browser.NAME == "chrome") {
// mac has a much higher sppedup during scrolling
if (qx.bom.client.Platform.MAC) {
return -(this._native.wheelDelta / 1200);
} else {
return -(this._native.wheelDelta / 120);
}
} else {
// windows safaris behave different than on OSX
if (qx.bom.client.Platform.WIN) {
var factor = 120;
// safari 5.0 and not 5.0.1
if (qx.bom.client.Engine.VERSION == 533.16) {
factor = 1200;
}
} else {
factor = 40;
// Safari 5.0 or 5.0.1
if (qx.bom.client.Engine.VERSION == 533.16 || qx.bom.client.Engine.VERSION == 533.17) {
factor = 1200;
}
}
return -(this._native.wheelDelta / factor);
}
}
}) |
Had a look at this today. Here's the value of Safari 5.0.5 (6533.21.1) Chrome 13.0.782.112 Pretty big difference. Changing the Perhaps some sort of conditional is needed? Or is there a better way to handle things like this. |
Interestingly it is fixed in Safari 5.1 (7534.48.3). I think your fix is fine since Safari 5 almost always reports numbers above 800 and no other browser ever reaches 800. |
I noticed that the initial scroll can still be a bit too fast. I think this is due to This seems to fix it: if (Math.abs(e.wheelDeltaY) > max)
max = Math.abs(e.wheelDeltaY) |
I've just made exactly this change. Also I had to increase the threshold since Chrome could exceed the threshold and then scrolling became really slow. https://github.com/ajaxorg/pilot/commit/b60e9954e67887a01abc12a56db1e11495ef961d |
Sweet! Thanks. |
Now it's opposite, too slow. Running Chrome 15.0.874.92 beta-m the scroll wheel step is now two lines at a time, it takes ages to scroll the document. When my Windows 7 native is around 8 lines, which works just fine elsewhere in Chrome. Why is OS default scroll stepping even being tampered with? |
We have to normalize the scroll speed and direction because some browsers (esp. some versions of Safari) report numbers which are an order of magnitude higher than normal. Take a look at the numbers above. However I think I tried to be too smart. I'll take a look into this again. |
Scrolling is also epic fast in Titanium Desktop, which uses a webkit engine. |
Is there a temporary workaround to slow down scroll speed? Thanks. |
Also, note that scrolling grinds to a halt after a moment of scrolling in Adobe AIR. Mentioned in Issue #401. |
Thing I don't get it is why they even tamper the OS Wheel stepping setting? Can't they just leave it alone? |
Fix ajaxorg#654: double clicking php vars selects the $ sign
Fix double click php var selects the $ sign #2
There are multiple issues reported here without clear steps to reproduce and mostly for very old browsers. I think it's better to close this issue, so that when there are new issues related to scrolling, they can be reported in separate threads where it will be much easier to reproduce and fix. @Ciantic they need to "tamper the OS Wheel" to make virtual viewport work, without which editor would be very slow. |
…g-oom-crash fix oom crash when cdata tag unclosed
The scrolling of the text feels way too fast in chrome. The code shows in the mouse wheel handler not browser normalization. Just take a look at the qooxdoo mouse wheel event of qooxdoo to see how we recently changed it:
http://qooxdoo.svn.sourceforge.net/viewvc/qooxdoo/trunk/qooxdoo/framework/source/class/qx/event/type/MouseWheel.js?revision=22904&view=markup
(by wittemann)
@Gissues:{"order":98.13664596273293,"status":"backlog"}
The text was updated successfully, but these errors were encountered: