$.ui.mouse.defaults

3 views
Skip to first unread message

Danny

unread,
Jun 7, 2009, 10:38:15 PM6/7/09
to jQuery UI Development
I've been looking over the code and notice that $.ui.mouse.defaults
are never incorporated into the actual widget options. The widgets
that use $.ui.mouse include their own cancel, distance and delay
options in their defaults. Does anything actually use
$.ui.mouse.defaults?

Scott González

unread,
Jun 7, 2009, 10:41:49 PM6/7/09
to jquery...@googlegroups.com
Doesn't look like it, though anything that extends $.ui.mouse should extend its defaults.  Feel free to open a ticket for this.

Danny

unread,
Jun 8, 2009, 8:15:35 AM6/8/09
to jQuery UI Development

Scott González

unread,
Jun 8, 2009, 9:04:39 AM6/8/09
to jquery...@googlegroups.com
Hey Danny,

I actually disagree with your recommended solution.  I would suggest setting $.ui.mouse.defaults.cancel to ":input,option" and having all widgets that use mouse extend its defaults (selectable would be the only one that changes any of the defaults, by setting distance to 0).

Danny

unread,
Jun 8, 2009, 10:03:01 AM6/8/09
to jQuery UI Development
Scott:
You are of course correct; the right solution is for the widgets to
use the common $.ui.mouse.defaults (presumably by modifying _mouseInit
to actually look at the options).
My suggestion was a quick 2-byte hack that left everything else
unchanged.

On Jun 8, 8:04 am, Scott González <scott.gonza...@gmail.com> wrote:
> Hey Danny,
>
> I actually disagree with your recommended solution.  I would suggest setting
> $.ui.mouse.defaults.cancel to ":input,option" and having all widgets that
> use mouse extend its defaults (selectable would be the only one that changes
> any of the defaults, by setting distance to 0).
>
> On Mon, Jun 8, 2009 at 8:15 AM, Danny <d.wac...@prodigy.net> wrote:
>
> > Done.http://dev.jqueryui.com/ticket/4584

Scott González

unread,
Jun 8, 2009, 8:46:40 PM6/8/09
to jQuery UI Development
Fixed.

Danny

unread,
Jun 9, 2009, 10:05:27 AM6/9/09
to jQuery UI Development
Thanks. I updated the widget tutorial to reflect this requirement (any
widget using $.ui.mouse needs to incorporate the mouse defaults)
--Danny

On Jun 8, 7:46 pm, Scott González <scott.gonza...@gmail.com> wrote:
> Fixed.
Reply all
Reply to author
Forward
0 new messages