Scale Firefox scrolling for mouse only, not trackpad (#1324)

This commit is contained in:
Eric Rosenbaum
2017-09-19 13:47:23 -04:00
committed by Rachel Fenichel
parent d0e1141a9f
commit cc8a12a574

View File

@@ -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