Semantic-ui: [Modal] with detachable=false is not working with 2.3

Created on 23 Feb 2018  路  12Comments  路  Source: Semantic-Org/Semantic-UI

Hi,

with 2.3 the undetachable modal is not working correctly anymore.

See https://jsfiddle.net/ca0rovs3/221/

Confirmed Bug

Most helpful comment

I'll look at this in patch.

All 12 comments

Hi, I also have css issue with Controlled modal... After updating to version 2.3

$('.ui.tiny.modal').modal({detachable: false, centered: true }).modal('show');

If detachable:false is removed, then the modal is displayed in the center. Otherwise it aligns itself on the top right.
Has anyone found a fix yet?

I'll look at this in patch.

bump!

does not work with patch 2.3.2 :(

Ugh... This bug just brought development of one of my pages to a grinding halt.

@tastesliketurkey
If your page does not postback and you have all the data pulled using ajax, you can just avoid having detachable false

@manasilele Yeah, I need to post back, and the modal contains data I need. 馃檨 I got around it by just manually rendering the dimmer and modal where I want them, but it still would have been nice to stick with the default implementation.

@TastesLikeTurkey does it align in the center though?

Do you mean now that I'm rendering it manually? If so, then yes. Here's what I'm doing:

// Inside my form. I'm using Razor Pages, so this is not rendered if the modal shouldn't be shown,
// but you could also use JavaScript to control the visibility.
<div class="ui dimmer modals active" style="position:fixed;">
    <div class="ui active modal">
        // Modal content
    </div>
</div>

I spent a whole day trying to fix my modals and bugs caused by 2.3 version of semantic.

The best solution at the moment is to make a rollback to 2.2.

npm install [email protected]
gulp build

Modals are fixed, labels displayed correctly.

Try this :
$('#your-modal-id').modal({ useFlex: false}).modal("show");
$('.ui.dimmer.modals').appendTo('#your-form-id');
$('.ui.dimmer.modals').css('overflow', 'scroll');
$('#your-modal-id').css('position', 'relative');

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mixerp picture mixerp  路  3Comments

vinhtq picture vinhtq  路  3Comments

larsbo picture larsbo  路  3Comments

ghost picture ghost  路  3Comments

iPaoo picture iPaoo  路  3Comments