Search and Top Navigation
#7498 closed feature (fixed)
Opened June 23, 2011 03:11AM UTC
Closed November 04, 2014 01:16PM UTC
Last modified March 10, 2015 04:15PM UTC
Sortable: Floating detection only occurs during initialization
Reported by: | jamesh | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.11.4 |
Component: | ui.sortable | Version: | 1.8.13 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Tested with Firefox 4.0.1 on Windows 7.
jQuery UI 1.8.13
Example:
Reproduce:
1. On an empty div.
2. call .tabs()
3. call .sortable()
4. add tabs with .tabs('add', .. )
5. Sorting is then partially broken.
this.floating is only determined during _create() (on line 53 in jquery.ui.sortable.js), so when floating items are added later on this.floating is incorrect.
I'm not sure whether this is indeed a bug, or just misuse, as I have fixed my problem by moving the .sortable() after .tabs('add').
Perhaps advising the user of this potential problem in the tabs documentation.
Attachments (0)
Change History (16)
Changed November 28, 2011 01:12PM UTC by comment:1
Changed June 26, 2012 01:22AM UTC by comment:2
type: | enhancement → feature |
---|
Changed October 11, 2012 02:55PM UTC by comment:3
milestone: | 1.9.0 → 2.0.0 |
---|
Changed November 05, 2012 12:32PM UTC by comment:4
status: | new → open |
---|
Consider for redesign. Make sortable just work in that case or have user call refresh(), and document as such.
Changed February 05, 2013 09:07PM UTC by comment:5
summary: | Sortable/tabs issue when calling .sortable() before dynamically adding tabs → Sortable: Floating detection only occurs during initialization |
---|
Changed March 11, 2013 03:12AM UTC by comment:6
The internal
floatingflag is also used to determine horizontal vs. vertical sorting.
And, because
this.floatingis only determined in
_create, if you start with an empty sortable it is assumed to be vertical. You can see the problem this creates in the following two examples:
Vertical works: http://jsfiddle.net/tj_vantoll/4A42n/ Horizontal doesn't: http://jsfiddle.net/tj_vantoll/s867Q/
Another reason to have
refreshupdate this value.
Changed June 02, 2014 02:55PM UTC by comment:10
#10083 is a duplicate of this ticket.
Changed October 31, 2014 12:26PM UTC by comment:11
#10678 is a duplicate of this ticket.
Changed October 31, 2014 01:54PM UTC by comment:12
Changed November 04, 2014 01:16PM UTC by comment:13
resolution: | → fixed |
---|---|
status: | open → closed |
Sortable: Redetermine floating flag when recalculating positions
This addresses a bug where users initialize empty sortable lists are
add items dynamically. In this situation refresh() should recognize the
position and orientation of the new items.
Fixes #7498
Closes gh-1381
Changeset: f656aebe3f99356b7eb91ffdafe6689ecc8fb4ae
Changed November 04, 2014 01:17PM UTC by comment:14
milestone: | 2.0.0 → 1.12.0 |
---|
Changed March 10, 2015 04:11PM UTC by comment:15
Sortable: Redetermine floating flag when recalculating positions
This addresses a bug where users initialize empty sortable lists are
add items dynamically. In this situation refresh() should recognize the
position and orientation of the new items.
Fixes #7498
Closes gh-1381
(cherry picked from commit f656aebe3f99356b7eb91ffdafe6689ecc8fb4ae)
Changeset: 189f1d476c2d6f53c88f9e92bdaffbc64ed9c572
Changed March 10, 2015 04:15PM UTC by comment:16
milestone: | 1.12.0 → 1.11.4 |
---|
#7918 is a duplicate of this ticket.