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

Fix IE11 auto-scroll behaviour #1394

Closed

Conversation

nathanpower
Copy link

@nathanpower nathanpower commented Jul 6, 2019

This is another attempt at the fix previously tried with #1384.

I was able to see the auto-scrolling issues mentioned in the above PR by auto-scrolling with the various lists in the storybook, looks like it also needs a check for window.document, which this PR adds.

Repro steps for original bug:

  • Run the storybook and go to fixed list with fixed sidebar
  • (In IE11) with dev-tools open, drag an item such that auto-scroll is triggered

Bug:

  • Error in console - Invariant failed: Window scrolling is currently not supported for fixed lists. Aborting drag

BTW - If you are testing Edge / IE11 locally on a Mac, I can highly recommend Parallels. I had previously been debugging using a Win10 VM on VirtualBox, and it was pretty painful/slow. Currently using the the demo of Parallels Desktop and it's super fast. One thing, in case it saves you some time, if you want to run storybook on the host and open it in your VM you will need to run the following from privileged command line on VM:

For VirtualBox:

netsh interface portproxy add v4tov4 listenport=9002 listenaddress=127.0.0.1 connectport=9002 connectaddress=10.0.2.2

For Parallels:

netsh interface portproxy add v4tov4 listenport=9002 listenaddress=127.0.0.1 connectport=9002 connectaddress=10.211.55.2

@nathanpower nathanpower changed the title fix: ignore window scroll event if it has bubbled Fix IE11 auto-scroll behaviour Jul 6, 2019
@nathanpower nathanpower mentioned this pull request Oct 14, 2019
@alexreardon
Copy link
Collaborator

Is this now the working fix @nathanpower ?

@alexreardon
Copy link
Collaborator

alexreardon commented Oct 14, 2019

This issue fell through the cracks for me. I remember we added a fix at one point and had to roll it back

@nathanpower
Copy link
Author

Is this now the working fix @nathanpower ?

Well, it did seem to fix the described issue on IE11, and not cause the other issue that prompted the rollback. But given the test suite was not passing when I opened this, I should probably rebase this over the latest v12 branch, test again and check everything is still green, WDYT?

Is https://github.com/atlassian/react-beautiful-dnd/tree/virtual the branch to use?

@alexreardon
Copy link
Collaborator

I have included your fix in a commit that will make its way onto dev early next week

@nathanpower
Copy link
Author

Just checked latest preview storybook on IE11, and the issue seems to be fixed now

Many thanks @alexreardon 👍

Will close this

@nathanpower nathanpower deleted the ie11-drag-scroll-fix2 branch October 24, 2019 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants