Skip to content

Using for...in to loop on Arrays may break if Array.prototype is modified by the app #1539

Description

@efattal

Problem:

I would like to use Sortable in a WebComponent inside an app where old frameworks that I can hardly remove (PrototypeJS and ExtJS 3.4) override Array.prototype. Hence, Sortable breaks on drag-dropping when looping on arrays (like _detectNearestEmptySortable on sortables).

I submit a Pull Request that fixes the issue.
#1540

JSBin/JSFiddle demonstrating the problem:

http://jsfiddle.net/efattal/zv2h8bnx/1/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions