Opened 7 months ago

Closed 6 months ago

#15042 closed bug (fixed)

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

Reported by: rmacfadyen Owned by: scottgonzalez
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 6 months ago by scottgonzalez

  • Keywords regression added
  • Milestone changed from none to 1.12.1
  • Priority changed from minor to blocker
  • Status changed from new to open

comment:3 Changed 6 months ago by scottgonzalez

  • Owner set to scottgonzalez
  • Resolution set to fixed
  • Status changed from open to closed

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.