Skip to content

Commit

Permalink
fix(content): ensure fixed slot renders on top of content in iOS (#24300
Browse files Browse the repository at this point in the history
)
  • Loading branch information
amandaejohnston committed Dec 1, 2021
1 parent 7f61b06 commit e41b0e0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions core/src/components/content/content.scss
Expand Up @@ -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);
}

0 comments on commit e41b0e0

Please sign in to comment.