-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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: resizing/transition issue on every current browser #2221
Comments
Looks like duplicate of #1867. |
Hi, We don't understand, why the scrolling css class was calculated based on component and window inner height. const scrolling = height >= window.innerHeight In semantic ui (jquery) its a setable property and was not calculated by the component itself. With a property scrolling:true/false the flickering will be gone. Its verfied by modifing react semantic ui. Alternatively it would be an option to controll the scrolling from outside additionally. Thx |
Thanks for the investigation. SUIR calculates a few properties for developer convenience. In this case, a Modal that extends taller than the screen should become scrollable. Modals that fit within the screen height do not need to be scrollable. This is always true and not applying the class in these cases would produce a "broken" UI for the user. That said, the issue is that the Modal margin was not taken into account in the calculation. I've fixed this locally, but it needs to be cleaned up for a PR. A fix would be to measure the height + border + margin of the modal without the Currently, the measurement doesn't differentiate between scrolling or non-scrolling modals. It also doesn't consider the border and margin, it only considers the height. The height changes when going from non-scrolling to scrolling, due to the inclusion of outer margin when scrolling. |
@levithomason Any ETA on fix? |
im too ,help me please |
No ETA. Please use SO and Gitter for help requests. GitHub is reserved for performing work. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions. |
|
@Glathrop Just discovered that, thanks for this workaround. |
Can you check please the latest release with SUI 2.3? |
I have the same problem since I updated to versions 0.81.x. With 0.80.x everything was OK. |
Please add a minimal repro case on codesandbox. |
There has been no activity in this thread for 180 days. While we care about every issue and we’d love to see this fixed, the core team’s time is limited so we have to focus our attention on the issues that are most pressing. Therefore, we will likely not be able to get to this one. However, PRs for this issue will of course be accepted and welcome! If there is no more activity in the next 180 days, this issue will be closed automatically for housekeeping. To prevent this, simply leave a reply here. Thanks! |
I personnaly fix this by adding those two lines on my modal component. The height value depending of your needs, for me it was 300..
|
Just adding class It happens after upgrading to 0.81 and later versions. 0.80.2 is ok. |
Hi, I must say I'm very new to react & semantic-ui as well. |
I provided a fix in #3679, please try it, feedback there is much appreciated 🙌 |
Hi,
we found a bug while using the semantic react dialog component.
--> Animiated Gif to show the effect <--
We can repoduce this error on
https://react.semantic-ui.com/modules/modal#modal-example-dimmer
but not with the jquery version.
So it seems a css problem base on adding / removing the scrolling class by react.
The main problem is, thats a edge case failure, that can only be repoduced if the modal dialog / the body tag will add / remove the scrolling css class and also the height and width are so chosen that the dialog doesnt fit the browser windows by missing some pixels in height and width.
For own dialogs with larger content this happens on normal sized pages, so many users of our site get this problem, when they have a special resolution.
Steps
Open the default modal dialog dimmer example with
chrome with a html / body size of width: 345px / height: 583px
firefox with a html / body size of width: 337px / height: 574px
EDGE with a html / body size of width: 332px / height: 576px
We cant repoduce the behavior with the device emulation mode on the chrome dev tools.
Expected Result
Stable Layout
Actual Result
The modal dialog is switching between scolling and not scrolling.
We think the recalculation by react adds the scrolling class to the body and also to the modal dialog and remove this again and add this again and so on.
Its toggling between (on the chrome example)
and
Also seen on the react component
<div class="ui modal transition visible active" style="margin-top: -289px;">
<div class="ui scrolling modal transition visible active" style="margin-top: -294px;">
The text was updated successfully, but these errors were encountered: