<?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>28179</bug_id>
          
          <creation_ts>2009-08-11 10:20:21 -0700</creation_ts>
          <short_desc>[Qt] Shortcuts on webpages don&apos;t work if the Qt application has the same shortcut</short_desc>
          <delta_ts>2014-02-03 03:12:58 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Platform</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Benjamin Meyer">ben</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>hausmann</cc>
    
    <cc>jturcotte</cc>
    
    <cc>kenneth</cc>
    
    <cc>tonikitoo</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>139020</commentid>
    <comment_count>0</comment_count>
    <who name="Benjamin Meyer">ben</who>
    <bug_when>2009-08-11 10:20:21 -0700</bug_when>
    <thetext>Google docs has the shortcut Ctrl+s to save your document, but if the application using QWebPage has a shortcut for Ctrl+S (Save As typically) the QWebPage will not get the key press and the QShortcut will be fired instead.

Manualtest: Using arora where ctrl+s is set to Save As

Notes: This was the Google Docs bug reported in the Arora review on cnet http://crave.cnet.co.uk/software/0,39029471,49303237-3,00.htm</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>139026</commentid>
    <comment_count>1</comment_count>
      <attachid>34575</attachid>
    <who name="Benjamin Meyer">ben</who>
    <bug_when>2009-08-11 10:25:04 -0700</bug_when>
    <thetext>Created attachment 34575
possible fix</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>139032</commentid>
    <comment_count>2</comment_count>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2009-08-11 10:29:56 -0700</bug_when>
    <thetext>Simon had some concerns about web apps being able to &quot;overwrite&quot; shortcuts.

Would be good to see if the HTML5 have a say in this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>139038</commentid>
    <comment_count>3</comment_count>
    <who name="Benjamin Meyer">ben</who>
    <bug_when>2009-08-11 10:50:20 -0700</bug_when>
    <thetext>These two arora bug reports look like they might also be for this bug:
http://code.google.com/p/arora/issues/detail?id=515
http://code.google.com/p/arora/issues/detail?id=230</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>139242</commentid>
    <comment_count>4</comment_count>
      <attachid>34575</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-08-11 22:33:34 -0700</bug_when>
    <thetext>Comment on attachment 34575
possible fix

Seems we should have a manual-test for this.  It should be possible to test in DumpRenderTree, but would likely require modification to DRT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>139276</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2009-08-12 01:01:22 -0700</bug_when>
    <thetext>I agree that this change a test, even an autotest would be sufficient.

But more generally speaking I admit I don&apos;t like this solution: shortcutOverrideEvent is not a substitute for handling key events. Handling it means accepting or rejecting the event, but not processing the actual keys. That belongs into keyPressEvent.

But with this patch it is just a matter of time until someone complains that their application shortcuts are overridden by web pages, and that&apos;s harder to control and we have to tell them to re-implement shortcutOverrideEvent?

I would prefer to see Arora handle its shortcuts in a re-implementation of keyPressEvents.

Another option might be to make QWebPage&apos;s behaviour of overriding all shortcuts configurable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>139298</commentid>
    <comment_count>6</comment_count>
    <who name="Antonio Gomes">tonikitoo</who>
    <bug_when>2009-08-12 04:54:48 -0700</bug_when>
    <thetext>if i understood this bug correctly, I the path mozilla is taking to support this kind of situation:

in bug https://bugzilla.mozilla.org/show_bug.cgi?id=448602 they implementing a way to verify if there is a default key listener for a given key (in this case control+s), but application could verify that before setting their own, avoiding conflicts in a safe way.

we could consider implementing something similar in webkit ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>139323</commentid>
    <comment_count>7</comment_count>
    <who name="Benjamin Meyer">ben</who>
    <bug_when>2009-08-12 08:08:32 -0700</bug_when>
    <thetext>Some more notes from looking things up:

The documentation for ShortcutOverride is very slim and I am not exactly sure how it is suppose to be used, when it is called,  or if this is even the Qt way to handle this bug.  Looking through Qt&apos;s source it looked like when a widget overrides a global shortcut (like many do such as QLineEdit, QComboBox etc) they should handle this event saying that they should eat the keyevent and not allow a shortcut to.  Is this correct?

If we could know that there is a listener for a key without having to actually pass a key event then we could accept the event on ShortcutOverride without having to send the key event.  This seems like the correct approach to solving this. 

Tested Safari and it behaves as expected; ctrl+s doesn&apos;t do Save As, but passes it to the DOM and GoogleDocs so there might be some code in WebKit already to handle this.

Simon, you mentioned that Arora could handle its shortcuts in a re-implementation of
keyPressEvents.  To do this were you thinking to overload ShortcutOverrideEvent, always accept the event and then in the KeyPressEvent if the key isn&apos;t accepted walk up the parent tree find all QShortcut children, and test their QKeySequence if it matches call that shortcut and return?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>975013</commentid>
    <comment_count>8</comment_count>
    <who name="Jocelyn Turcotte">jturcotte</who>
    <bug_when>2014-02-03 03:12:58 -0800</bug_when>
    <thetext>=== Bulk closing of Qt bugs ===

If you believe that this bug report is still relevant for a non-Qt port of webkit.org, please re-open it and remove [Qt] from the summary.

If you believe that this is still an important QtWebKit bug, please fill a new report at https://bugreports.qt-project.org and add a link to this issue. See http://qt-project.org/wiki/ReportingBugsInQt for additional guidelines.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>34575</attachid>
            <date>2009-08-11 10:25:04 -0700</date>
            <delta_ts>2010-06-11 12:25:10 -0700</delta_ts>
            <desc>possible fix</desc>
            <filename>0001-2009-08-11-Benjamin-C-Meyer-ben-meyerhome.net.patch</filename>
            <type>text/plain</type>
            <size>3083</size>
            <attacher name="Benjamin Meyer">ben</attacher>
            
              <data encoding="base64">RnJvbSBiYjFiNTA0OTZiMjc4NWU5NDYyMzc5MjUzODE2MTE2ZWJhZTQ0NTY0IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBCZW5qYW1pbiBDIE1leWVyIDxiZW5qYW1pbi5tZXllckB0b3Jj
aG1vYmlsZS5jb20+CkRhdGU6IFR1ZSwgMTEgQXVnIDIwMDkgMDg6MTg6NTcgLTA0MDAKU3ViamVj
dDogW1BBVENIXSAyMDA5LTA4LTExICBCZW5qYW1pbiBDIE1leWVyICA8YmVuQG1leWVyaG9tZS5u
ZXQ+CgogICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgoKICAgICAgICBQYXNzIGtl
eSBldmVudHMgdG8gdGhlIGRvbSBpbiBzaG9ydGN1dE92ZXJyaWRlRXZlbnQgc28gd2Vic2l0ZXMK
ICAgICAgICBsaWtlIEdvb2dsZURvY3MgY2FuIGNhdGNoIEN0cmwrUyBiZWZvcmUgYXBwbGljYXRp
b24gUVNob3J0Y3V0cyBkby4KICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1
Zy5jZ2k/aWQ9MjgxNzkKCiAgICAgICAgKiBBcGkvcXdlYnBhZ2UuY3BwOgogICAgICAgIChRV2Vi
UGFnZVByaXZhdGU6OmtleVByZXNzRXZlbnQpOgogICAgICAgIChRV2ViUGFnZVByaXZhdGU6OnNo
b3J0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RPdmVycmlkZUV2ZW50
KToKKwogMjAwOS0wOC0xMCAgS2F2aW5kcmEgUGFsYXJhamEgIDxrYXZpbmRyYS5wYWxhcmFqYUBu
b2tpYS5jb20+CiAKICAgICAgICAgUmV2aWV3ZWQgYnkgU2ltb24gSGF1c21hbm4uCi0tIAoxLjYu
MC40Cgo=
</data>
<flag name="review"
          id="18729"
          type_id="1"
          status="-"
          setter="eric"
    />
          </attachment>
      

    </bug>

</bugzilla>