WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
56526
[Qt] Mouse events fall through MouseArea to underlying WebView
https://bugs.webkit.org/show_bug.cgi?id=56526
Summary
[Qt] Mouse events fall through MouseArea to underlying WebView
Damian Jansen
Reported
2011-03-16 19:47:13 PDT
WebView seems to have clicks bypassed from an overlayed MouseArea. This is incorrect - MouseArea events once accepted by the MouseArea should not be visible to the WebView. In the attached example: 1. Click on the colored bar at the top of the view to bring the menu down. 2. Right click on the menu bar * Bug: The Reload menu appears 3. Leftclick somewhere else in the menu bar 4. Click on one of the Images,Videos,Maps etc links * Bug: The WebView navigates to the clicked link Relocated from
http://bugreports.qt.nokia.com/browse/QTBUG-16895
Attachments
Example QML to demonstrate issue
(1.84 KB, application/octet-stream)
2011-03-16 19:59 PDT
,
Damian Jansen
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Damian Jansen
Comment 1
2011-03-16 19:59:59 PDT
Created
attachment 86021
[details]
Example QML to demonstrate issue
Caio Marcelo de Oliveira Filho
Comment 2
2011-04-14 07:51:17 PDT
Damian, MouseArea has a property called 'acceptedButtons', which is by default Qt.LeftButton. Buttons not accepted are not treated by the MouseArea, and can affect the WebView.
http://doc.qt.nokia.com/latest/qml-mousearea.html#acceptedButtons-prop
When mouse hovers on top of a link, the cursor changes. To avoid that, you should use 'hoverEnabled: true' to make the mouse area track the hover events and avoid them to hit WebView.
http://doc.qt.nokia.com/latest/qml-mousearea.html#hoverEnabled-prop
In your example, MouseArea blocks the Left Button for me. So I don't think there's nothing wrong in your example. BUT, if I change your example based on my comment to "cover all the bases", everything works except for the Right Click that still shows the menu with RELOAD. I'm looking into that issue.
Caio Marcelo de Oliveira Filho
Comment 3
2011-04-14 16:47:45 PDT
(In reply to
comment #2
)
> BUT, if I change your example based on my comment to "cover all the bases", everything works except for the Right Click that still shows the menu with RELOAD.
I think this is a Qt problem, I made a merge request for fixing it
https://qt.gitorious.org/qt/qt/merge_requests/1185
basically the issue is that context menu event is triggered at a higher level (QWidget level) and MouseArea is unaware of it. Proposed fix is to make MouseArea aware of those events and block them if makes sense (see merge requested for details).
Caio Marcelo de Oliveira Filho
Comment 4
2011-05-13 09:14:57 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > BUT, if I change your example based on my comment to "cover all the bases", everything works except for the Right Click that still shows the menu with RELOAD. > > I think this is a Qt problem, I made a merge request for fixing it > >
https://qt.gitorious.org/qt/qt/merge_requests/1185
This was merged and is now on Qt 4.7 repository, should be available in Qt 4.7.4.
https://qt.gitorious.org/qt/qt/commit/80db0a1e59658f9e445219fc48d9236a79edca72
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug