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

[Drawer] breaks DOM scrolling when shown while hiding dialog #3318

Closed
rob2d opened this issue Feb 12, 2016 · 6 comments
Closed

[Drawer] breaks DOM scrolling when shown while hiding dialog #3318

rob2d opened this issue Feb 12, 2016 · 6 comments
Labels
component: drawer This is the name of the generic UI component, not the React module!

Comments

@rob2d
Copy link

rob2d commented Feb 12, 2016

If you have a scrolling page with a dockable LeftNav and docked={false}, and that LeftNav is the parent of a React component, it creates a giant div that breaks scrolling if you attempt to show it upon closing another modal dialog (using states as switches).

Currently using:
ReactJS : 0.14.7
Material-UI : HEAD@1d4c4a8
Google Chrome Version 47.0.2526.106

@mbrookes
Copy link
Member

Thanks for the clear report! 👍

An example would be good too, so we can reproduce this.

Do you want to have a go at fixing it?

@rob2d
Copy link
Author

rob2d commented Feb 12, 2016

I haven't had a chance to figure it out since unfortunately (well fortunately) I can still test the rest of my app for the time being (its a CMS) and I had a lot of other priorities/deadlines with my current sprint.

I did look around earlier this week to get these details and couldn't out my finger on what it changed in the DOM to cause this spefically... but I noticed it happened as soon as I created a LeftNav component that was self contained within its own React Component render (and this issue doesn't occur when docked=true, however for a modal this is not too great). Sorry for not being more elaborate, but if I can find some time to make a jist next week I will definitely do that.

@rob2d
Copy link
Author

rob2d commented Feb 23, 2016

Well, this thing seems beyond me. Since it seems a pretty serious UI issue, can one of the project devs look into it? I can also confirm that this issue seems to be global (as in all browsers) as it also breaks my Firefox (v42.0)

@mbrookes
Copy link
Member

Without an example to reproduce the issue with, there's really very little we can do to help, sorry.

@rob2d
Copy link
Author

rob2d commented Mar 8, 2016

Sorry about the delayed response; I had a chance to look into it today found the issue more specifically! It basically happens if you have any dialog pop up, close it via a state flag during an action while simultaneously pulling out the LeftNav (also via setState). For now, I am using a workaround of setting few ms timeout before updating state on the callback, but it's still an issue. I will also test a few alternative fixes as workaround now that are not as hacky.

@rob2d rob2d changed the title [LeftNav] breaks DOM scrolling when not docked and in a component [LeftNav] breaks DOM scrolling when shown while hiding dialog Mar 8, 2016
@mbrookes mbrookes changed the title [LeftNav] breaks DOM scrolling when shown while hiding dialog [Drawer] breaks DOM scrolling when shown while hiding dialog Mar 25, 2016
@mpontikes mpontikes mentioned this issue Aug 5, 2016
13 tasks
@oliviertassinari oliviertassinari added the component: drawer This is the name of the generic UI component, not the React module! label Dec 18, 2016
@oliviertassinari
Copy link
Member

We have been porting the component on the v1-beta branch. We reimplemented it from the ground-up. While we haven't tested it, I think that the issue is most likely fixed on that branch. Hence, I'm closing it.
Still, we will accept PR fixes until v1-beta takes over the master branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: drawer This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants