You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by neilbennett <nb...@awaremanager.com> on 2014/04/02 23:20:11 UTC

Re: ModalWindow and jQuery mousedown binding

Hello again. Thanks for your help, I've found what occurs. When removing
onmousedown="Wicket.Event.stop(event);" from the w_content_1 div, the event
then propagates. However, the mouseDownHandler function is called in the
Drag class in wicket-ajax-jquery.js this returns false which then stops
further event propagation. Commenting out the return false then allows my
component popup window to close.

So that's the cause, I'm not sure of the best way to work around this. I can
crudely remove the bindings/return value, but I'm sure that will break
things. Thought I'd report back anyway - if anyone has any suggestions to
work around this or what would break/not break from changing this.

Thanks,

Neil 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859p4665236.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: ModalWindow and jQuery mousedown binding

Posted by neilbennett <nb...@awaremanager.com>.
Hi Martin,

You are exactly right. The other Wicket.Event.stop(event) does need to be
commented out. I've found that while this does allow pop-up's to be closed,
it also stops fields taking focus. I will submit a JIRA issue with a
quickstart though.

Thanks,

Neil

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859p4665250.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: ModalWindow and jQuery mousedown binding

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Thanks for sharing your findings !

On Wed, Apr 2, 2014 at 11:20 PM, neilbennett <nb...@awaremanager.com>wrote:

> Hello again. Thanks for your help, I've found what occurs. When removing
> onmousedown="Wicket.Event.stop(event);" from the w_content_1 div, the event
> then propagates. However, the mouseDownHandler function is called in the
> Drag class in wicket-ajax-jquery.js this returns false which then stops
> further event propagation. Commenting out the return false then allows my
> component popup window to close.
>

I am not sure why only commenting out the return statement helps.
At
https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L2410there
is another Wicket.Event.stop(event) call that I think also should
mess the things up in your case ...


>
> So that's the cause, I'm not sure of the best way to work around this. I
> can
> crudely remove the bindings/return value, but I'm sure that will break
> things. Thought I'd report back anyway - if anyone has any suggestions to
> work around this or what would break/not break from changing this.
>

I am also not aware why this code needs to stop the propagation of the
event.
Please file a bug in our Jira with a quickstart and I'll try to find out.


>
> Thanks,
>
> Neil
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859p4665236.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>