Fomantic-UI icon indicating copy to clipboard operation
Fomantic-UI copied to clipboard

Popup (on:'click') properly not close when body {height :100%}

Open dutrieux opened this issue 2 years ago • 3 comments

Bug Report

Popup (on:'click') is not properly close when body=100%

Testcase

https://jsfiddle.net/dutrieux/5wc6123e/

Screenshot

fomantic-bug

When I set height of body to 'auto', that's work properly (but it's not a good solution, the position with popup doesn't work properly with body:auto;)

the problem is in the hideGracefully function on popup module, the method isInDOM return false in this case. and when body is 100%, in fact the real height is not on overall page :

image

Version

2.9.2

dutrieux avatar Feb 13 '23 22:02 dutrieux

Hi! I am working on resolving this issue

sophiajwitt avatar Apr 17 '23 13:04 sophiajwitt

When testing this bug locally, I found that the issue only appears when the window is small enough to require scrolling. In this instance, I have stumbled upon two potential fixes: the first to set body to fit-content in place of 100%, and adjust min-height to 100vh.

Screen Shot 2023-04-24 at 11 26 09 AM Screen Shot 2023-04-24 at 11 27 04 AM

When testing this fix method locally, the popup remains unaffected, however this was mentioned to not work using auto, as that affected the popup positioning.

Another fix would be to introduce an additional element that is the size of the entire page that is fixed, and incorporating that element into the hideGracefully function. Either of these fixes are probably best completed locally by the user as they are likely to affect other features within the codebase.

sophiajwitt avatar Apr 24 '23 15:04 sophiajwitt

Thanks @sophiajwitt for investigation. As both possible solutions are out of the popup module scope (popup should not adjust body), i don't think we can/should implement anything into the FUI Core for that specific situation but rather use your solutions as custom CSS/HTML if needed. @dutrieux Thoughts?

lubber-de avatar Apr 24 '23 15:04 lubber-de