Modal: Bad position on second show
When modal showed for second time it "falls" half bellow screen.
var self = $('.ui.modal');
self.modal({
onShow: function () {
self.modal('refresh'); // does NOT help
setTimeout(function () {
self.modal('refresh');
}, 1000); // does help 1s is probably overkill
}
});
My uneducated guess is position is computed and set only first time when modal is shown and second time default CSS makes it fall.
Modal includes some generated items by KnockoutJS but items are not added between shows.
I can't reproduce any issues from modal docs related to positioning.
Can you make a jsfiddle?
OTR I sent you private demo on your email.
Same problem as you. I noticed that after window being closed, margin-top property has still a value. If I set it to 0 via Chrome Inspector it'll show up properly. Even on docs page (http://semantic-ui.com/modules/modal.html) problem occurs. Clicking on "run code" for the second time returns non-centered modal. Any ideas?
Same problem for me
This isnt occurring for me in Chrome/Safari/FF.
Can someone give me their exact browser version and OS who can see this issue?
OS: Microsoft Windows 7 HP (build 7601, Service Pack 1, latest updates) Browser: Google Chrome 33.0.1750.117 m (latest for me)
I'm seeing this in chrome as well on windows 7. This is a bug will fix ASAP
:heart:
Having same issue, ff/chrome/opera @ ubuntu 14.04 b2
It looks like having a set height on the modal fixes this issue for me
same here problem is solved by setting explicit height of modal...
bug is still reproduced
Thanks, could anyone create a JSFiddle that will reproduce the issue?
This might be related to having a parent with a 3D acceleration trigger like backface-visibility or transform
@jlukic I have reproduced the error due to the overridden ".hidden" property .hidden{ display: none!important; } http://jsfiddle.net/d93af/13/
I'm using FF 28, Windows 8 and cannot reproduce the error using your JSFiddle.
Am I missing something?
My problem was caused by .hidden with !important as well. +1
P.S. Linux ff latest stable, chromium latest stable
@jlukic see the link below http://goo.gl/ATWsaS
It looks like modals were rebuilding cached sizes on every show instead of just on browser resize. Bad!
I've also fixed modals to work with css that has a rule like .hidden { display: none !important; }
I have the problem with wrong position on 2+ show. It works OK with semantic 0.15.5. Newest version still have this bug, but when the document or window size is changed, margin of the modal is fixed.
Windows 8 Chrome 34
@kwolniak Are you having this problem on the docs page or just your site? Can you provide a test-case for this error with latest SUI?