Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (ion-content): move slot="fixed" inside wrapper div #17797

Closed
wants to merge 3 commits into from
Closed

fix (ion-content): move slot="fixed" inside wrapper div #17797

wants to merge 3 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 15, 2019

Short description of what this resolves:

Fix the visibility of the content when passed through slot "fixed".

Changes proposed in this pull request:

  • Move slot="fixed" inside the div wrapper, fixes the issue

Ionic Version: 4.10.3

Fixes: #17754

@ionitron-bot ionitron-bot bot added the package: core @ionic/core package label Mar 15, 2019
@ghost ghost changed the title fix (ion-content): move slot="fi" fix (ion-content): move slot="fixed" inside wrapper div Mar 15, 2019
@brandyscarney
Copy link
Member

Thank you for the PR! This fix will break the FAB functionality:

master akshit-wwstay:ion-content-slot-fix
localhost_3333_src_components_fab_test_basic(iPhone 6_7_8) (1) localhost_3333_src_components_fab_test_basic(iPhone 6_7_8) (2)

The fixed content needs to be outside of the scrolling div as it should not scroll with the page. I believe the solution to this bug may be to add the following css to content.scss but it would require further testing:

::slotted([slot="fixed"]) {
  position: absolute;
}

🙂

@DavidWiesner
Copy link
Contributor

DavidWiesner commented Mar 26, 2019

The problem is a missing z-index. When adding a z-index to the fixed slot, the text is visible again. By default the fixed slot is behind the scroll content. So instead of adding a div there should be set a z-index on the fixed slot or the fixed slot should move above the scroll slot.

@dalemugford
Copy link

The problem is a missing z-index. When adding a z-index to the fixed slot, the text is visible again. By default the fixed slot is behind the scroll content. So instead of adding a div there should be set a z-index on the fixed slot or the fixed slot should move above the scroll slot.

I'm finding the reverse— divs with slot="fixed" are always on top of ion-content, with no way to make them below ion-content. This prevents UI choices like having a parallax header with a fixed image behind content that can scroll overtop.

@brandyscarney
Copy link
Member

Thanks again for the PR! I added a PR here that should fix this: #19867

I'm going to close this as it has been merged. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants