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

Modal not centered correctly when using detachable: false

Open rmarchiori opened this issue 7 years ago • 3 comments

Bug Report

Hello, it seems that the modal is not centering correctly when using option detachable: false and we have a long scrollable content.

My guess is that it is not calculating the top property correctly, it seems to be using the body height instead of viewport height.

Note 1: If you remove detachable : false option it works. Note 2: If you remove like a paragraph of text you will then see the modal, but it won't be centered though.

Steps to reproduce

  1. Open the fiddle and click on show modal button

Expected result

Modal should be centered.

Actual result

Modal is not centered.

Testcase

jsFiddle link

My original Semantic-ui repository issue link

Version

2.7.8

rmarchiori avatar Sep 09 '19 16:09 rmarchiori

It's not centered vertically, though it does stay centered if you make the window tall enough for the content and resize it down.

Screen record from 2019-09-09 13 43 25

GammaGames avatar Sep 09 '19 19:09 GammaGames

It's centered to the dimmer. If your viewport is too small and have to scroll, the dimmer stay upper so the modal is not centered anymore. It's a bug, but I don't know how to fix this 😕

prudho avatar Sep 12 '19 07:09 prudho

Fixed by #1013 See your adjusted jsfiddle here http://jsfiddle.net/dgzLjxwv/

lubber-de avatar Sep 12 '19 16:09 lubber-de