Skip to content

No auto-scroll on drag  #553

@firatsarlar

Description

@firatsarlar

To reproduce :
Please open example page on safari or firefox ( maybe IE ) : https://gaearon.github.io/react-dnd/examples-sortable-simple.html
And resize browser keep some of elements of list outside screen, then try to drag, page should scroll during drag but not. ( In chrome works correctly )
This issue is open in Firefox.
You may want to check releated stack overflow question.
http://stackoverflow.com/questions/16822920/scroll-while-using-html5-drag-and-drop

As a solution :
Please checkout https://github.com/martindrapeau/jQueryDndPageScroll/blob/master/jquery.dnd_page_scroll.js

Also working example
https://jsfiddle.net/0vv7fs63/2/

I'm not suggesting to use jquery plugin but checking source code.
Simply adding two divs ( top and bottom of the page ) and listening drag over/enter events, and scrolling accordingly is the solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions