Opened 7 years ago

Closed 7 years ago

#15042 closed bug (fixed)

Sortable 'cancel' method raises js error "Uncaught TypeError: e.preventDefault is not a function"

Reported by: rmacfadyen Owned by: Scott González
Priority: blocker Milestone: 1.12.1
Component: ui.sortable Version: 1.12.0
Keywords: regression Cc:
Blocked by: Blocking:


The underlying problem is that the cancel method passes a fake event object to _mouseUp... but the fake event is just an object literal "{ target: null }" rather than an actual event. _mouseUp calls preventDefault on the passed event... which throws the error.

Here's a fiddle that reproduces the behavior:

Change History (3)

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

Keywords: regression added
Milestone: none1.12.1
Priority: minorblocker
Status: newopen

comment:3 Changed 7 years ago by Scott González

Owner: set to Scott González
Resolution: fixed
Status: openclosed

In 19027bb:

Sortable: Use an event object for simulated mouseup in cancel()

Regression caused by a1d69208bad175a27c7b50c27fdc10001563cd4d

Fixes #15042
Closes gh-1746

Note: See TracTickets for help on using tickets.