[JR] Bugfix/restore original container style on destroy #104
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #103
Description
Writing some tests to familiarize with ad.js (+ bonus increase coverage) and came across:
https://github.com/Econify/ad.js/blob/master/src/plugins/Sticky.ts#L34
Understanding is original style is a reference to container.style so the next line that sets the value of container.style overwrites the original value to be preserved in this.originalStyle (used for restoration in .onDestroy -> .cleanUp). As is this means position and top if set are never restored to their original values onDestroy -> cleanUp.
PR Requirements
Before requesting review this criteria must be met:
Overall test coverage >= current master?
Documentation included (if any behavioral changes)?
Backwards compatibility (if breaking change)?
Release
Will this pr trigger a release i.e.
version
inpackage.json
has been bumped?Screenshots
If U.I. component, include screenshots or video screen capture showing
behavior and responsive styling below.