Skip to main content

Search and Top Navigation

#10083 closed bug (duplicate)

Opened June 02, 2014 02:48PM UTC

Closed June 02, 2014 07:23PM UTC

Last modified June 03, 2014 07:30AM UTC

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.floating = this.items.length ? o.axis === "x" || this._isFloating(this.items[0].item) : false;

should be

Let's determine if the items are being displayed horizontally

this.floating = o.axis === "x" || (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

Attachments (0)
Change History (6)

Changed June 02, 2014 02:55PM UTC by tj.vantoll comment:1

resolution: → duplicate
status: newclosed

Duplicate of #7498.

Changed June 02, 2014 03:58PM UTC by lukepage comment:2

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?

Changed June 02, 2014 07:22PM UTC by tj.vantoll comment:3

resolution: duplicate
status: closedreopened

Changed June 02, 2014 07:23PM UTC by tj.vantoll comment:4

resolution: → duplicate
status: reopenedclosed

Duplicate of #9443.

Changed June 02, 2014 07:25PM UTC by tj.vantoll comment:5

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).

Changed June 03, 2014 07:30AM UTC by gentooboontoo comment:6

I would be glad if the #9443 bug fix is finally merged. I could rebase my PR if needed.