Fomantic-ui: Modal not centered correctly when using detachable: false

Created on 9 Sep 2019  路  3Comments  路  Source: fomantic/Fomantic-UI

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

lanjavascript typbug

Most helpful comment

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

All 3 comments

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

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 馃槙

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jamessampford picture jamessampford  路  3Comments

prmdhost picture prmdhost  路  5Comments

kawaji picture kawaji  路  3Comments

lubber-de picture lubber-de  路  4Comments

GammaGames picture GammaGames  路  4Comments