Opened 6 years ago

Closed 3 years ago

#7430 closed bug (fixed)

Draggable: _adjustOffsetFromHelper not reinvoked after "start" event is fired

Reported by: marcel.jackwerth Owned by:
Priority: minor Milestone: 1.11.2
Component: ui.draggable Version: 1.8.13
Keywords: haspatch Cc:
Blocked by: Blocking:


While _cacheHelperProportions is reinvoked after the start-event, _adjustOffsetFromHelper is not. This leads to issues if you use right/bottom offsets (which depend on width/height) and you modify the helper (or it's content) during the start-event.

Here's the code of draggables mouseStart (removed irrelevant code for this problem)

//Cache the helper size

//Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));

//Recache the helper size

This could be fixed if we just add another _adjustOffsetFromHelper after the re-caching or are there any side-effects I am missing?

(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));

Change History (3)

comment:1 Changed 4 years ago by scottgonzalez

  • Milestone changed from 1.9.0 to 2.0.0

comment:2 Changed 4 years ago by mikesherov

  • Keywords haspatch added
  • Status changed from new to open
  • Summary changed from _adjustOffsetFromHelper not reinvoked after start-event to Draggable: _adjustOffsetFromHelper not reinvoked after "start" event is fired

This makes sense. The offset should be adjusted after the start event is fired.

comment:3 Changed 3 years ago by mikesherov

  • Milestone changed from 2.0.0 to 1.11.2
  • Resolution set to fixed
  • Status changed from open to closed

This should now be irrelevant that #7772 is fixed. If you can still reproduce a bug, please let me know and I'll reopen this.

Note: See TracTickets for help on using tickets.