Fix position when relative element become smaller #25
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.
Reset the affix position when the relative element height become smaller than the affix container and thus should be positioned on top. This case happens, for example, when the relative element contains dynamic (router) views and the affix element is on the side and acts similarly to vertical tabs.
@eddiemf I haven't been able to setup a jsfiddle to showcase that issue: it happens in a private project where the affix container is a side menu that changes the current route. The relative element contains a
<router-view>
and in some cases the current page has a smaller height than the affix element. With current version (v0.2.4), the affix element stay blocked to its last affixed position.