<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>56526</bug_id>
          
          <creation_ts>2011-03-16 19:47:13 -0700</creation_ts>
          <short_desc>[Qt] Mouse events fall through MouseArea to underlying WebView</short_desc>
          <delta_ts>2011-05-13 09:34:28 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>420+</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Damian Jansen">damian.jansen</reporter>
          <assigned_to name="Caio Marcelo de Oliveira Filho">cmarcelo</assigned_to>
          <cc>ademar</cc>
    
    <cc>benjamin</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>jaakko.tuosa</cc>
    
    <cc>menard</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>368748</commentid>
    <comment_count>0</comment_count>
    <who name="Damian Jansen">damian.jansen</who>
    <bug_when>2011-03-16 19:47:13 -0700</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>368761</commentid>
    <comment_count>1</comment_count>
      <attachid>86021</attachid>
    <who name="Damian Jansen">damian.jansen</who>
    <bug_when>2011-03-16 19:59:59 -0700</bug_when>
    <thetext>Created attachment 86021
Example QML to demonstrate issue</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>385758</commentid>
    <comment_count>2</comment_count>
    <who name="Caio Marcelo de Oliveira Filho">cmarcelo</who>
    <bug_when>2011-04-14 07:51:17 -0700</bug_when>
    <thetext>Damian, MouseArea has a property called &apos;acceptedButtons&apos;, 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 &apos;hoverEnabled: true&apos; 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&apos;t think there&apos;s nothing wrong in your example.

BUT, if I change your example based on my comment to &quot;cover all the bases&quot;, everything works except for the Right Click that still shows the menu with RELOAD.

I&apos;m looking into that issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>386178</commentid>
    <comment_count>3</comment_count>
    <who name="Caio Marcelo de Oliveira Filho">cmarcelo</who>
    <bug_when>2011-04-14 16:47:45 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; BUT, if I change your example based on my comment to &quot;cover all the bases&quot;, 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).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>403586</commentid>
    <comment_count>4</comment_count>
    <who name="Caio Marcelo de Oliveira Filho">cmarcelo</who>
    <bug_when>2011-05-13 09:14:57 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; BUT, if I change your example based on my comment to &quot;cover all the bases&quot;, everything works except for the Right Click that still shows the menu with RELOAD.
&gt; 
&gt; I think this is a Qt problem, I made a merge request for fixing it
&gt; 
&gt; 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</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>86021</attachid>
            <date>2011-03-16 19:59:59 -0700</date>
            <delta_ts>2011-03-16 19:59:59 -0700</delta_ts>
            <desc>Example QML to demonstrate issue</desc>
            <filename>Web3.qml</filename>
            <type>application/octet-stream</type>
            <size>1884</size>
            <attacher name="Damian Jansen">damian.jansen</attacher>
            
              <data encoding="base64">aW1wb3J0IFF0UXVpY2sgMS4xDQppbXBvcnQgUXRXZWJLaXQgMS4wDQoNClJlY3RhbmdsZSB7DQog
IGlkOiByb290V2luZG93DQogIHdpZHRoOiA5NjA7IGhlaWdodDogNTQwDQogIGNvbG9yOiAiIzNm
M2YzZiINCg0KDQogIEZsaWNrYWJsZSB7DQogICAgYW5jaG9ycy5maWxsOiBwYXJlbnQNCiAgICBj
b250ZW50SGVpZ2h0OiB3ZWJWaWV3LmhlaWdodA0KICAgIGNvbnRlbnRXaWR0aDogd2ViVmlldy53
aWR0aA0KDQogICAgV2ViVmlldyB7DQogICAgICBpZDogd2ViVmlldw0KICAgICAgdXJsOiAiaHR0
cDovL2dvb2dsZS5jb20iDQogICAgICBmb2N1czogZmFsc2UNCiAgICAgIHByZWZlcnJlZFdpZHRo
OiByb290V2luZG93LndpZHRoDQogICAgICBwcmVmZXJyZWRIZWlnaHQ6IHJvb3R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