yowainwright/stickybits

Inline styles are not removed when noStyles option is enabled

angkhaustova opened this issue · 2 comments

Describe the bug
With noStyles option enabled, position in inline styles of the sticky element does not get cleared when returning to the initial position.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codepen.io/angkhaustova/pen/xxEXzzN
  2. Resize the preview until it can be scrolled
  3. Scroll down
  4. Scroll back up
  5. The sticky element still has position: fixed

Expected behavior
position: fixed should be removed from styles attribute.

Screenshots
image

Desktop (please complete the following information):

  • OS: iOS
  • Browser: chrome
  • Version: 87.0.4280.88

Hello @angkhaustova!

What would fixing this issue do for you? 🙂
It would be great to know what you're using Stickybits for and what problem this issue causes you.

I see in the Codepen the noStyles and useFixed options are used... which would/can definitely create some interesting situations.

Closing b/c of inactivity 😄