input type=image causes submit on right click
David Faure
dfaure at klaralvdalens-datakonsult.se
Fri Jan 17 15:25:47 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday 17 January 2003 16:11, George Staikos wrote:
> For an input tag, <input type="image" name="submit">, so that an image is in
> use, does it make sense for RMB click to do a submit as well? This is the
> case currently, and I'm not sure that I agree with that behaviour.
Seems strange to me that CLICK_EVENT leads to DOMACTIVATE_EVENT
for all buttons ... I suppose this should only happen with LMB?
Index: dom_nodeimpl.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/xml/dom_nodeimpl.cpp,v
retrieving revision 1.201
diff -u -p -r1.201 dom_nodeimpl.cpp
- --- dom_nodeimpl.cpp 14 Jan 2003 02:14:37 -0000 1.201
+++ dom_nodeimpl.cpp 17 Jan 2003 15:25:32 -0000
@@ -523,7 +523,8 @@ bool NodeImpl::dispatchGenericEvent( Eve
!evt->defaultPrevented() && !evt->defaultHandled(); --it)
it.current()->defaultEventHandler(evt);
- - if (evt->id() == EventImpl::CLICK_EVENT && !evt->defaultPrevented())
+ if (evt->id() == EventImpl::CLICK_EVENT && !evt->defaultPrevented() &&
+ static_cast<MouseEventImpl*>( evt )->button() == 0) // LMB click
dispatchUIEvent(EventImpl::DOMACTIVATE_EVENT, static_cast<UIEventImpl*>(evt)->detail());
}
Untested.
- --
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Klarälvdalens Datakonsult AB, Platform-independent software solutions
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
KOffice-1.2.1 is available - http://download.kde.org/stable/koffice-1.2.1/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+KCB772KcVAmwbhARAidhAJ9UPUQhKuakA69XFHlOlkJqUSP1lgCfdJ+o
Qn2DOOVhrN1I0BDJWCPRsfY=
=jgX7
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list