mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Fix compatibility with canScroll
This commit is contained in:
@@ -238,6 +238,15 @@ bool Converter<blink::WebMouseWheelEvent>::FromV8(
|
||||
dict.Get("accelerationRatioX", &out->accelerationRatioX);
|
||||
dict.Get("accelerationRatioY", &out->accelerationRatioY);
|
||||
dict.Get("hasPreciseScrollingDeltas", &out->hasPreciseScrollingDeltas);
|
||||
|
||||
#if defined(USE_AURA)
|
||||
// Matches the behavior of ui/events/blink/web_input_event_traits.cc:
|
||||
bool can_scroll = true;
|
||||
if (dict.Get("canScroll", &can_scroll) && !can_scroll) {
|
||||
out->hasPreciseScrollingDeltas = false;
|
||||
out->modifiers &= ~blink::WebInputEvent::ControlKey;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user