gyorgygutai / react-sticky-fill

Dead simple Stickyfill ReactJS wrapper
MIT License
12 stars 7 forks source link

Inline CSS #1

Closed marisaroque closed 6 years ago

marisaroque commented 7 years ago

I'm trying to use this pollyfil, but I noticed that the inline css added was only style="top: 0px; z-index: 1; and my div is not sticky. Is it correct?

Note: testing in Chrome v56.

Thanks for your work and for your help.

gyorgygutai commented 7 years ago

Hey Marisa!

Great catch!

The unprefixed version of position: sticky isn't being applied with the inline styles, and Chrome doesn't use the prefixed attribute anymore. A temporary solution could be to pass a className and add position: sticky manually.

Thank you. A fix will be published soon with both position: sticky and position: -webkit-sticky (for Safari) in the css.

marisaroque commented 7 years ago

Thank you for the feedback, @gyorgygutai. I'll be waiting for the fix.

gyorgygutai commented 6 years ago

Fixed!

marisaroque commented 6 years ago

Good work. Thanks!