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

pushable breaks children that has position: fixed, making them scrollable #1699

Closed
kevinresol opened this issue Oct 7, 2020 · 4 comments
Closed
Labels
type/usage Any support issues asking for help

Comments

@kevinresol
Copy link

Bug Report

pushable breaks children that has position: fixed in a way that they are no longer fixed relative to window but relative to the pushable itself

Steps to reproduce

  1. Have a position: fixed element inside pushable

Expected result

position: fixed elements should be fixed relative to window, regardless of scrolling of any other elements

Actual result

position: fixed element (itself, not its children) become scrollable somehow

Reason

pushable has a transform: translate3d(0, 0, 0); according to https://stackoverflow.com/a/37953806/3212365

Testcase

https://jsfiddle.net/wkoerjs7/1/

  1. click "Click Me" to toggle the position: fixed of the box (red=fixed, green=not fixed)
  2. check that the fixed box is scrollable with the parent, but fixed element should be fixed relative to window

Version

2.8.7

@kevinresol kevinresol added state/awaiting-investigation Anything which needs more investigation state/awaiting-triage Any issues or pull requests which haven't yet been triaged type/bug Any issue which is a bug or PR which fixes a bug labels Oct 7, 2020
@kevinresol kevinresol changed the title [scope] summary of your bug pushable breaks children that has position: fixed, making it scrollable Oct 7, 2020
@kevinresol kevinresol changed the title pushable breaks children that has position: fixed, making it scrollable pushable breaks children that has position: fixed, making them scrollable Oct 7, 2020
@ko2in ko2in removed state/awaiting-triage Any issues or pull requests which haven't yet been triaged type/bug Any issue which is a bug or PR which fixes a bug labels Oct 7, 2020
@ko2in
Copy link
Member

ko2in commented Oct 7, 2020

Someone has already asked the similar issue and there is solution explained.

@kevinresol
Copy link
Author

I think none of the solution works...

  1. For me it is not viable to move the element to root
  2. inline-block does create a new block context, but itself is still scrollable. So if the inline-block is scrolled, any fixed children in it will also move and are no longer "fixed to window"
  3. overflow doesn't work too because my other contents are scrollable

@ko2in
Copy link
Member

ko2in commented Oct 8, 2020

@kevinresol Maybe this should work for you (https://jsfiddle.net/ko2in/hs7a540L/10/).

@kevinresol
Copy link
Author

thanks very much!

@lubber-de lubber-de added type/usage Any support issues asking for help and removed state/awaiting-investigation Anything which needs more investigation labels Oct 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/usage Any support issues asking for help
Projects
None yet
Development

No branches or pull requests

3 participants