Skip to main content

Search and Top Navigation

#4584 closed bug (fixed)

Opened June 08, 2009 12:10PM UTC

Closed June 09, 2009 12:46AM UTC

$.ui.mouse.defaults never used

Reported by: d.wachss Owned by:
Priority: minor Milestone: 1.8
Component: ui.core Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:
Description

in ui.core.js , $.ui.mouse.defaults are defined but never used. The ui components that use $.ui.mouse (draggable, resizeable, etc.) define their own cancel, delay and distance options.

This is mostly just wasted bytes (the functions work with the options undefined), but is a problem for _mouseMove, which uses _mouseDistanceMet, which requires a non-zero value for distance. A widget that does not define distance will never trigger _mouseDrag.

Quick fix: eliminate $.ui.mouse.defaults entirely and make _mouseDistanceMet work with distance === undefined by reversing the condition:

return !(Math.max(...) < this.options.distance)

(any comparision with undefined returns false)

Attachments (0)
Change History (2)

Changed June 08, 2009 01:06PM UTC by scottgonzalez comment:1

milestone: TBD1.8

Changed June 09, 2009 12:46AM UTC by scottgonzalez comment:2

resolution: → fixed
status: newclosed

Fixed in r2678.