input type=image causes submit on right click
George Staikos
staikos at kde.org
Fri Jan 17 15:30:28 GMT 2003
Yes I agree with this.. I'm just wondering if this was done on purpose
though. Dirk?
Otherwise I think this should get checked into both branches.
On Friday 17 January 2003 10:25, David Faure wrote:
> 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.
--
George Staikos
More information about the kfm-devel
mailing list