fix(content): ensure fixed slot renders on top of content in iOS (#24300)

This commit is contained in:
Amanda Smith
2021-12-01 13:47:39 -06:00
committed by GitHub
parent 7f61b06895
commit e41b0e0cf2

View File

@ -199,4 +199,15 @@
::slotted([slot="fixed"]) {
position: absolute;
/**
* When presenting ion-content inside of an ion-modal, the .inner-scroll
* element is composited. In WebKit, the fixed content is not composited
* causing it to appear under the main scrollable content as a result.
* The fixed content is correctly composited in other browsers. Adding
* the translateZ forces the fixed content to be composited so it correctly
* shows on top of the scrollable content. Setting a negative z-index will
* still allow the fixed content to appear under the scroll content if specified.
*/
transform: translateZ(0);
}