diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 0deecaca6bd65134643b219c7d951045ceadf9d9..f8c18a61a442c46fcd3a39ef594049cba69e00bc 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -1946,6 +1946,17 @@ void CefRenderWidgetHostViewOSR::OnGestureEvent( } #if BUILDFLAG(IS_OHOS) + blink::WebGestureEvent web_event = + ui::CreateWebGestureEventFromGestureEventData(gesture); + if (web_event.GetType() == blink::WebInputEvent::Type::kGestureScrollUpdate && + browser_impl_.get()) { + CefRefPtr handler = + browser_impl_->client()->GetRenderHandler(); + CHECK(handler); + handler->FilterScrollEvent(browser_impl_.get(), + web_event.data.scroll_update.delta_x, + web_event.data.scroll_update.delta_y, 0, 0); + } if (gesture.type() == ui::ET_GESTURE_SCROLL_BEGIN) { gesture_update_count_ = 0; } else if (gesture.type() == ui::ET_GESTURE_SCROLL_UPDATE) {