mirror of
https://github.com/google/blockly.git
synced 2026-01-09 10:00:09 +01:00
Scale Firefox scrolling for mouse only, not trackpad (#1324)
This commit is contained in:
committed by
Rachel Fenichel
parent
d0e1141a9f
commit
cc8a12a574
@@ -221,8 +221,9 @@ Blockly.HorizontalFlyout.prototype.wheel_ = function(e) {
|
||||
var delta = e.deltaX;
|
||||
|
||||
if (delta) {
|
||||
if (goog.userAgent.GECKO) {
|
||||
// Firefox's deltas are a tenth that of Chrome/Safari.
|
||||
// Firefox's mouse wheel deltas are a tenth that of Chrome/Safari.
|
||||
// DeltaMode is 1 for a mouse wheel, but not for a trackpad scroll event
|
||||
if (goog.userAgent.GECKO && (e.deltaMode === 1)) {
|
||||
delta *= 10;
|
||||
}
|
||||
// TODO: #1093
|
||||
|
||||
Reference in New Issue
Block a user