Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Randomly totally broken in Firefox #332

Open
hyperknot opened this issue Jun 4, 2018 · 8 comments
Open

Randomly totally broken in Firefox #332

hyperknot opened this issue Jun 4, 2018 · 8 comments
Labels

Comments

@hyperknot
Copy link

hyperknot commented Jun 4, 2018

In Firefox, sometimes, react-sortable-tree can get into a totally locked up state. This means that:

  1. Dragging doesn't work at all.
  2. Visually it looks bad. Non dragged items are thought to be dragged, in the rowCancelPad state.
  3. Some static nodes are thought to be 0.5 opacity nodes, like while dragging, but actually they are not dragged.
  4. canDrop is actually not called.

The worst part of this is that reloading the page doesn't solve this issue. Once a page gets into this state, it'll stay this forever. The only fix is to open a new tab and close the old one.

I'm trying to make a reproducible case, but my code is basically node-renderer-default and tree-node-default simplified.

It happens more frequently if I'm clicking on an item quickly after page load.

sortable

@hyperknot
Copy link
Author

OK, I could reproduce it with the official examples on the official pages.

One particular way to trigger it is to drag one node and then quickly double click. Playing around a bit with dragging and quickly double clicking can get into this state in Firefox.

It kind of thinks it's in a continuous dragging state.

sortable

@hyperknot
Copy link
Author

You can see how this broken state persist after page reloads.

sortable

@wuweiweiwu wuweiweiwu added the bug label Jun 4, 2018
@wuweiweiwu
Copy link
Member

This is super weird. I don't think its with the react component though. Initially I thought there was some state inconsistency. But the reload should reset the state.

Thus I think the issue is with the HTML dnd backdend..

@hyperknot
Copy link
Author

I was thinking along the way. Maybe opening an issue in dnd is a good idea.

@wuweiweiwu
Copy link
Member

Definitely needs more investigation. I'm also thinking of getting rid of the dependency on react-dnd / html backend entirely. possibly using whatever react-sortable-hoc uses in the backend

@cormacrelf
Copy link

cormacrelf commented Jul 3, 2018

This is an awful bug in Firefox that is not fixed yet. react-dnd/react-dnd#1000

You could try https://github.com/zyzo/react-dnd-mouse-backend -- it would skip over all the browser-specific HTML5 bugs that just keep popping up.

Also, react-sortable-hoc doesn't use anything in the backend. It's all manual mouse/touch events.

@wuweiweiwu
Copy link
Member

Yeah... I wonder if its worth just writing everything manually. I'll talk to the author of react-sortable-hoc

I'll definitely check the mouse backend. Thanks @cormacrelf

@cormacrelf
Copy link

cormacrelf commented Jul 8, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants