ember-modal-dialog
ember-modal-dialog copied to clipboard
Odd initial positioning
I have installed ember-modal-dialog and am just doing some testing...there's one thing I can't figure out. I'm just wanting to open a regular centered modal, and when the modal opens, it's positioned at the bottom-right of the page. When toggled, it appears correctly.
My code is very simple and is based on the demo code:
{{#if isShowingModal}}
{{#modal-dialog
translucentOverlay=true
close="toggleModal"
}}
<img src="{{images.large}}" />
{{/modal-dialog}}
{{/if}}
I also tried tether-dialog with the same results. When I tinker with the positioning, sometimes I am able to get it to appear in the top left. But no matter what the settings, the modal appears either bottom-right or top-left on initial load.
I'm quite sure I'm doing something wrong, I just don't know what it is! Thanks!
it seems like it's calculating the dimensions before the image loads. Can you add width and height to the img tag? If that's not possible, perhaps try preloading the image before toggling the modal.
I was experiencing this same issue. Can confirm that specifying a width / height fixed the issue for me