Ticket #7430 (open bug)
Draggable: _adjustOffsetFromHelper not reinvoked after "start" event is fired
| Reported by: | marcel.jackwerth | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.0.0 |
| Component: | ui.draggable | Version: | 1.8.13 |
| Keywords: | haspatch | Cc: | |
| Blocking: | Blocked by: |
Description
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 this._cacheHelperProportions(); //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); //Recache the helper size this._cacheHelperProportions();
This could be fixed if we just add another _adjustOffsetFromHelper after the re-caching or are there any side-effects I am missing?
this._cacheHelperProportions(); (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
Change History
comment:2 Changed 7 months 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.
Note: See
TracTickets for help on using
tickets.

