Skip to main content

Search and Top Navigation

#6921 closed bug (invalid)

Opened February 01, 2011 06:01AM UTC

Closed February 17, 2013 08:46AM UTC

Sortable: JS errors when using toleranceElement

Reported by: danimal Owned by: danimal
Priority: minor Milestone: 2.0.0
Component: ui.sortable Version: 1.8.9
Keywords: Cc:
Blocked by: Blocking:
Description

I tried using toleranceElement when using sortable. It worked great. It's not in the documentation but I found info about it online somewhere and makes sortable work much better.

It stopped working a couple days ago, not sure why. Firebug gives me this error.

e is null

this._getParentOffset();for(var f=this...his.containers[f].containerCache.top=

jquery-ui.min.js(line139)

I hope you document toleranceElement because it really made sortable feel much better and while you're at it fix whatever is causing it to not work for me.

jquery 1.4.4

jquery ui 1.8.9

Tried in chrome and firefox.

Attachments (0)
Change History (14)

Changed February 01, 2011 06:16AM UTC by danimal comment:1

If I use jquery-ui instead of jquery-ui.min the error is p is null instead of e is null.

Changed February 02, 2011 05:35AM UTC by danimal comment:2

_comment0: This started happening when I tried jquery 1.5. If I put this \ \ if (t.offset() == null || t.offset() == 0) { \ t = item.item; \ } \ \ at line 3506 it works. t is sometimes null or 0 for some reason.1296625040356802

This started happening when I tried jquery 1.5. If I put this

if (t.offset() == null || t.offset() == 0) {
    t = item.item;
}

at line 3506 it works. t is sometimes null or 0 for some reason.

Changed September 14, 2011 02:40AM UTC by ryanmelt comment:3

I submitted a pull request to get this fixed.

https://github.com/jquery/jquery-ui/pull/457

Changed November 17, 2011 02:50PM UTC by scottgonzalez comment:4

owner: → danimal
status: newpending

Please provide a reduced test case showing the problem.

Changed December 02, 2011 08:10AM UTC by trac-o-bot comment:5

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Changed July 25, 2012 11:37PM UTC by zelenyd1 comment:6

_comment0: Here is a [http://jsfiddle.net/zXFe8/ jsfiddle] showing a small test case with a draggable nested list and a sortable nested list. Strange things start happening when one of the top-level nodes from the draggable list gets dragged on and moved around the sortable nested list. Note that the jsfiddle produces different firebug errors than when you actually run a standalone version of the code. Hopefully this is a sufficiently minimal test case. \ 1343259557401208

Here is a jsfiddle showing a small test case with a draggable nested list and a sortable nested list. Strange things start happening when one of the top-level nodes from the draggable list gets dragged on and moved around the sortable nested list. Note that the jsfiddle produces different firebug errors than when you actually run a standalone version of the code. Hopefully this is a sufficiently minimal test case. Removing the toleranceElement from the sortable fixes the problem (but other strange things happen, which are documented in other tickets).

Changed July 26, 2012 12:30AM UTC by scottgonzalez comment:7

resolution: invalid
status: closedreopened

Changed October 11, 2012 02:54PM UTC by scottgonzalez comment:8

milestone: 1.9.02.0.0

Changed October 27, 2012 08:19PM UTC by mikesherov comment:9

status: reopenedopen

Changed February 02, 2013 02:53AM UTC by tj.vantoll comment:10

#9040 is a duplicate of this ticket.

Changed February 02, 2013 02:54AM UTC by tj.vantoll comment:11

summary: toleranceElementSortable: JS errors when using toleranceElement

Changed February 02, 2013 03:00AM UTC by tj.vantoll comment:12

The test case for this issue also runs into this problem https://github.com/jquery/jquery-ui/pull/906. I'll minify this down after that gets merged in.

Changed February 02, 2013 08:49PM UTC by tj.vantoll comment:13

status: openpending

The only valid test case posted on this issue functions correctly as of jQuery UI 1.9.1 - http://jsfiddle.net/tj_vantoll/hE69f/. The test case posted in the duplicate issue fails because

toleranceElement
expects a jQuery object, not a selector.

I'll mark this as pending for now since I can no longer recreate this problem. If anybody can, let me know and I can reinvestigate.

Changed February 17, 2013 08:46AM UTC by trac-o-bot comment:14

resolution: → invalid
status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!