#10083 closed bug (duplicate)
if sortable is initially created without items, it will always be considered vertical despite what options.axis is set to
Reported by: | lukepage | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | none |
Component: | ui.sortable | Version: | 1.10.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
This code
https://github.com/jquery/jquery-ui/blob/master/ui/sortable.js#L89
Let's determine if the items are being displayed horizontally
this._isFloating(this.items[0].item) : false; |
should be
Let's determine if the items are being displayed horizontally
(this.items.length ? this._isFloating(this.items[0].item) : false); |
otherwise it is impossible to override the axis if sortable is started without matching items
Change History (6)
comment:1 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 follow-up: 3 Changed 9 years ago by
Its not really a duplicate..
If #7498 is fixed then it will not necessarily fix this bug - e.g. someone using inline-block elements will still need to use the axis option, which is ignored because of the above line of code.
If I was going to fix #7498 it wouldn't necessarily depending on its implmentation fix this.
I was going to submit a pull request? Should I still bother or will it be closed because it doesn't fix the bug you've marked as this being a duplicate of?
comment:4 Changed 9 years ago by
Resolution: | → duplicate |
---|---|
Status: | reopened → closed |
Duplicate of #9443.
comment:5 Changed 9 years ago by
lukepage,
Ah ok. This is more accurately a duplicate of #9443, which already has a pull request that I believe addresses your concern (https://github.com/jquery/jquery-ui/pull/1035).
comment:6 Changed 9 years ago by
I would be glad if the #9443 bug fix is finally merged. I could rebase my PR if needed.
Duplicate of #7498.