Opened 10 years ago

Closed 10 years ago

#4584 closed bug (fixed)

$.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)

Change History (2)

comment:1 Changed 10 years ago by Scott González

Milestone: TBD1.8

comment:2 Changed 10 years ago by Scott González

Resolution: fixed
Status: newclosed

Fixed in r2678.

Note: See TracTickets for help on using tickets.