Adobe-Marketing-Cloud / aem-sample-we-retail

🚫 We.Retail has been archived, see instead the WKND Guide:
https://github.com/adobe/aem-guides-wknd
Apache License 2.0
123 stars 141 forks source link

Vertical aligment of modals broken in preview mode #86

Closed DominikSuess closed 8 years ago

DominikSuess commented 8 years ago

When ever the site is loaded "navigatable/clickable" in context of an editor, and therefore embedded via IFrame the vertical positioning of the bootstrap modal is not working anymore. The modals are not taking into account the viewport anymore but the complete height of the Iframe pushing the modal most times out of the view port.

dnlek commented 8 years ago

in my opinion it doesn't work for any popup - and won't ever work for any vertically centered popup.

It is because ContentFrame adjust it's height to whole page content and than scroll happens outside of page scope (ContentScrollView - this is scollable node). Because of this we don't have any scroll position, position fixed doesn't work as expected - there is no way to know what part of page we are looking at.

The only workaround I see is to add special behaviour based on for ex. .aem-AuthorLayer-Edit class. And even than we can't center it verticaly (I guess) but only show it on top of the page - or something like this.

@lrejmer @gabrielwalt @DominikSuess - Guys correct me if I am wrong.