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

Modal: scrolling issue when using sub-modals #2248

Closed
guillaumep opened this issue Oct 24, 2017 · 8 comments
Closed

Modal: scrolling issue when using sub-modals #2248

guillaumep opened this issue Oct 24, 2017 · 8 comments

Comments

@guillaumep
Copy link

✔ BUGS → This form is required:

I have a modal that invokes a modal, and this blocs scrolling in the first modal.

Here is how to reproduce:

Steps

  1. Open: https://codesandbox.io/s/pw5on5o7m7
  2. In the running app, click on 'Show modal'.
  3. Reduce window height until the button row of the modal is no longer visible.
  4. You will notice you can access the button row by scrolling the screen. Scroll so you can see the buttons and click on 'Open sub modal'.
  5. Close the modal with the 'x' at the top-right corner.
  6. You will be back at the first modal. Try to scroll to access the buttons.

Expected Result

You can access the button row by scrolling.

Actual Result

Scrolling does not work.

Version

0.75.1

Testcase

@layershifter layershifter changed the title Modal scrolling issue when using sub-modals Modal: scrolling issue when using sub-modals Oct 25, 2017
@layershifter
Copy link
Member

Thanks for detailed report 👍 Help is much appreciated there

@guillaumep
Copy link
Author

guillaumep commented Oct 25, 2017

I think I have found what is going on: when opening the sub-modal, the "scrolling" class is removed from the body element. It is not added back when the sub-modal is closed.

My understanding is that this is done here:

mountNode.classList.remove('scrolling')

As the second modal does not know about the first, the second modal removes the "scrolling" class, even though it should not have done so.

@RetroCraft
Copy link
Contributor

Seems to already have been talked about (but not fixed) in #1157.

There's already a workaround solution there, for anybody interested.

@RetroCraft
Copy link
Contributor

I've incorporated the workaround into a PR. Feedback?

@nzhtrtlc
Copy link

Is it fixed ? or not yet ?

@Zacele
Copy link

Zacele commented Dec 20, 2017

Could someone please fix this issue. It is causing alot of mess in my project right now

@nzhtrtlc
Copy link

@Zacele It is already fixed but not merged yet. There are 24 pull requests still waiting for approve.
I found a temp solution. I added this css code in to my css file. Then i imported this css file into javascript class which includes my modal.

.dimmed.dimmable > .ui.animating.dimmer, .dimmed.dimmable > .ui.visible.dimmer, .ui.active.dimmer { overflow: auto }

@guillaumep
Copy link
Author

@Zacele @nzhtrtlc @RetroCraft Please have a look at #2394.

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