From 701f6590a70695743f03423814530c5feb0173bf Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 4 Nov 2014 16:09:47 +0100 Subject: Fix selections after leave event We were sending a bad fake mouse event on leave events that caused WebCore to stop tracking mousepresses correctly. Since we continue to receive mouse-events after leave if a mouse button is down, we don't need the fake mouse event to unset hover states and can skip, and can skip sending it. Task-number: QTBUG-41419 Change-Id: I8d50c440f7556f7e34bb0c05248577583c2550b4 Reviewed-by: Jocelyn Turcotte --- Source/WebKit/qt/WidgetApi/qwebpage.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/WebKit/qt/WidgetApi/qwebpage.cpp') diff --git a/Source/WebKit/qt/WidgetApi/qwebpage.cpp b/Source/WebKit/qt/WidgetApi/qwebpage.cpp index 442cc4874..25777d8c0 100644 --- a/Source/WebKit/qt/WidgetApi/qwebpage.cpp +++ b/Source/WebKit/qt/WidgetApi/qwebpage.cpp @@ -912,6 +912,10 @@ void QWebPagePrivate::dropEvent(T *ev) void QWebPagePrivate::leaveEvent(QEvent*) { + // If a mouse button is pressed we will continue to receive mouse events after leaving the window. + if (mousePressed) + return; + // Fake a mouse move event just outside of the widget, since all // the interesting mouse-out behavior like invalidating scrollbars // is handled by the WebKit event handler's mouseMoved function. -- cgit v1.2.1