Semantic-ui: [Modal] - sets body height when modal can't fit but does not set it back when modal closes

Created on 10 Jul 2015  Â·  5Comments  Â·  Source: Semantic-Org/Semantic-UI

          screenHeight: function() {
            if( module.can.fit() ) {
              $body.css('height', '');
            }
            else {
              module.debug('Modal is taller than page content, resizing page height');
              $body
                .css('height', module.cache.height + (settings.padding * 2) )
              ;
            }
          },

This code runs on modal.show
but no code sets the body height back to '' when the modal closes

repro:

have modal thats bigger than body, show modal, close modal. Height still set on body.

Confirmed Bug

Most helpful comment

I solved the problem by adding

.modal {
        bottom: auto;

    }

to your page

All 5 comments

It was set to leave it in place I dont recall why but I'm fairly certain it can safely be removed.

Yeah I just call body.css height, '' when I hide the modal and haven't seen anything untoward.

On 11 Jul 2015, at 2:12 am, Jack Lukic [email protected] wrote:

It was set to leave it in place I dont recall why but I'm fairly certain it can safely be removed.

—
Reply to this email directly or view it on GitHub.

i have the issue with performance of simple modal window. my code look like here: https://ng-semantic.herokuapp.com/#/elements/modal , first exmpl,

but Modal doesn't work correctly. Can someone help me with it?
7

I solved the problem by adding

.modal {
        bottom: auto;

    }

to your page

.modal { bottom: auto; }

Solved too. Seems like Bootstrap conflicts with Semantic modal

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iPaoo picture iPaoo  Â·  3Comments

vinhtq picture vinhtq  Â·  3Comments

ghost picture ghost  Â·  3Comments

rdzidziguri picture rdzidziguri  Â·  3Comments

zhaoyao91 picture zhaoyao91  Â·  3Comments