Bug 190255

Summary: mousedown event is cancelable (W3C)
Product: [Applications] konqueror Reporter: lunter <lunter>
Component: kjsAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 4.2.2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: source

Description lunter 2009-04-21 15:00:26 UTC
Version:           4.2.2 (using KDE 4.2.2)
OS:                MS Windows
Installed from:    MS Windows

W3C Documentation: mousedown event is cancelable
Konqueror: mousedown event is not cancelable

Run attachment.
Comment 1 lunter 2009-04-21 15:00:52 UTC
Created attachment 32984 [details]
source
Comment 3 Maksim Orlovich 2009-04-21 15:36:13 UTC
Most likely (can't test right now):
--- khtmlview.cpp       (revision 956244)
+++ khtmlview.cpp       (working copy)
@@ -3756,7 +3756,7 @@
         }
         me->deref();

-        if (eventId == EventImpl::MOUSEDOWN_EVENT) {
+        if (eventId == EventImpl::MOUSEDOWN_EVENT && !me->defaultPrevented()) {
             // Focus should be shifted on mouse down, not on a click.  -dwh
             // Blur current focus node when a link/button is clicked; this
             // is expected by some sites that rely on onChange handlers running
Comment 4 Maksim Orlovich 2009-04-23 17:37:53 UTC
SVN commit 958236 by orlovich:

Make sure we don't transfer focus on a cancelled mousedown
BUG:190255
BUG:190142


 M  +1 -1      khtmlview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=958236
Comment 5 Maksim Orlovich 2009-04-23 17:39:43 UTC
SVN commit 958239 by orlovich:

automatically merged revision 958236:
Make sure we don't transfer focus on a cancelled mousedown
BUG:190255
BUG:190142

 M  +1 -1      khtmlview.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=958239