Skip to main content

Search and Top Navigation

#10731 closed bug (patcheswelcome)

Opened December 22, 2014 07:30AM UTC

Closed December 22, 2014 12:41PM UTC

Last modified December 22, 2014 11:27PM UTC

Draggable not respecting axis:"x" within table

Reported by: tiptop Owned by:
Priority: minor Milestone: none
Component: ui.draggable Version: 1.11.2
Keywords: Cc:
Blocked by: Blocking:
Description

I have a large table that contains cells with up to several items each. I want to support dragging such items between cells in their current rows. This works most of the time but for some specific items it doesn't. I have isolated a case where the problem occurs e.g both with Firefox 34.0 (on OS X) and with Safari 8.0.2: drag "2/2" to the left and it is immediately shown in the 1st instead of the 2nd row. It is apparently "only" a display problem, a drop would reach the right cell. The problem apparently disappears when I remove the rule for selector * the CSS.

Here is the HTML/CSS on JSFiddle: http://jsfiddle.net/xam3nsr0/

Is this a feature or a bug? Is there a better workaround than not changing fonts?

Attachments (0)
Change History (4)

Changed December 22, 2014 12:41PM UTC by scottgonzalez comment:1

resolution: → patcheswelcome
status: newclosed

This is caused by the snap option, not by the axis option. Since this behavior has existed for years and we're removing the snap options in the ongoing rewrite, I don't expect this to be fixed. However, if someone would like to track down the problem and send a pull request, we can review it.

Changed December 22, 2014 10:20PM UTC by tiptop comment:2

Thanks for the quick follow-up. Out of curiosity: is there a write-up that explains why snap options will be removed and what, if anything, replaces them.

Changed December 22, 2014 10:25PM UTC by scottgonzalez comment:3

Replying to [comment:2 tiptop]:

Out of curiosity: is there a write-up that explains why snap options will be removed

Not yet, but the gist of it is that there are way too many ways to limit movement and they often conflict with each other.

and what, if anything, replaces them.

Custom positioning via the drag event. This has existed for as long as I can remember, but unfortunately it hasn't been documented yet: https://github.com/jquery/api.jqueryui.com/issues/221 This allows developers to build whatever extensions they want, including rebuilding the snap options.

Changed December 22, 2014 11:27PM UTC by tiptop comment:4

Thanks again. I'll try to refactor my code accordingly.