Opened 11 years ago

Closed 11 years ago

#4282 closed bug (fixed)

Droppable changes options object

Reported by: d.wachss Owned by:
Priority: critical Milestone: 1.8
Component: ui.droppable Version: 1.6rc6
Keywords: Cc:
Blocked by: Blocking:

Description

based on this discussion http://groups.google.com/group/jquery-ui-dev/browse_thread/thread/abf6a10a8af2cac7

Droppable shouldn't modify the accept option, but should add a key to the widget object itself. Change line 23 from

this.options.accept = accept && $.isFunction(accept) ? accept : function(d) {

to

this.accept = $.isFunction(accept) ? accept : function(d) {

and line 53 from

this.options.accept = value && $.isFunction(value) ? value : function(d) {

to

this.accept = $.isFunction(value) ? value : function(d) {

(I also removed the unnecessary guard expressions) and change all the this.options.accept.call expressions to this.accept.call

Attachments (1)

ui.droppable.js.patch (3.6 KB) - added by ThrushAAX 11 years ago.
complete tested fix starting from the ticket description

Download all attachments as: .zip

Change History (3)

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

Milestone: TBD1.8
Priority: minorcritical

Changed 11 years ago by ThrushAAX

Attachment: ui.droppable.js.patch added

complete tested fix starting from the ticket description

comment:2 Changed 11 years ago by Jörn Zaefferer

Resolution: fixed
Status: newclosed

Applied in r2517, fixes 14 tests. Thanks for the contribution!

Note: See TracTickets for help on using tickets.