Giter Club home page Giter Club logo

Comments (11)

mgol avatar mgol commented on May 19, 2024

Thanks for the report. Can you provide a test case on JS Bin? Thanks!

from jquery-ui.

mgol avatar mgol commented on May 19, 2024

@danbernier ping

from jquery-ui.

danbernier avatar danbernier commented on May 19, 2024

I'll take a crack at it later today.

from jquery-ui.

mgol avatar mgol commented on May 19, 2024

@danbernier A gentle reminder about a test case. :)

from jquery-ui.

mgol avatar mgol commented on May 19, 2024

@danbernier Another friendly ping. :)

from jquery-ui.

jwcooper avatar jwcooper commented on May 19, 2024

Here is a demo showing the issue using nestedSortable and their default example:
https://jsbin.com/mizadimobu/2/edit?html,css,js,output

With jquery ui 1.12.1 it works fine, on 1.13.0 it throws the error. Sorry I don't have a simpler example for you, this is just one that we ran into, forcing us to rollback to 1.12.1 for now.

from jquery-ui.

danbernier avatar danbernier commented on May 19, 2024

Thanks @jwcooper! Sorry this got away from me @mgol. @jwcooper's looks about like what mine would've been.

from jquery-ui.

mgol avatar mgol commented on May 19, 2024

@jwcooper From what I see, the jQuery UI Nested Sortable library overwrites some methods in $.ui.sortable.prototype, in particular the private _mouseDrag method. When you do that, all bets are off. And, indeed, their version of _mouseDrag doesn't set the dragDirection property which is then used in other methods. That needs to be fixed in jQuery UI Nested Sortable.

@jwcooper are you by any chance using the same jQuery UI Nested Sortable library? Ah, I see from the stack trace that you do.

from jquery-ui.

mgol avatar mgol commented on May 19, 2024

I don't think there's anything to be done on the jQuery UI side here. The bug is in the jQuery UI Nested Sortable library, the way it overwrote private parts of the Sortable widget has always been risky. The library doesn't look maintained, with the last commit being done 4 years ago. Your best bet may be forking the library and backporting jQuery UI 1.13.0 changes to it. For this specific issue, the most important is this bit of _mouseDrag: https://github.com/jquery/jquery-ui/blob/1.13.0/ui/widgets/sortable.js#L442-L445. I can't guarantee there won't be more changes to backport until it stops being broken, though.

I'm going to close this since the issue is not in UI but feel free to continue discussing the issue here.

from jquery-ui.

jwcooper avatar jwcooper commented on May 19, 2024

@mgol Thanks for the tip on the issue and the fix, really appreciate it. It was indeed nested sortable that broke, and adding the dragDirection (and a few more things) worked with 1.13.

from jquery-ui.

codertushar avatar codertushar commented on May 19, 2024

This is fixed in ilikenwf/nestedSortable#138 (comment)
But the problem is it is not released yet(v2.1a). You can manually take the source code.

from jquery-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.