Fix content positioning for non-relative non-document body contentLocation elements#662
Merged
brianvoe merged 5 commits intobrianvoe:masterfrom Dec 6, 2025
Merged
Conversation
… document body that have a non-relative position
Contributor
Author
|
Found a potential bug in the changes with main and content div inside same scrollable element. |
Contributor
Author
|
Fixed - removed no-longer-necessary scroll offset logic causing incorrect position |
Contributor
Author
|
Found a better way to reproduce in codepen and there are still some issues, although it's better than it was. Will revisit this when I can take a closer look. |
Contributor
Author
|
Hello again. Turns out I wasn't even testing my fixes (it was loading from a branch where the changes had not yet been built for dist). These changes are good to go. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR addresses a bug that causes the dropdown content to be positioned incorrectly when it is set within a non-relative child other than the document.body (calculations were always done based on the viewport rather than the offsetParent of contentLocation).
See example: https://codepen.io/AnthonyANI/pen/ByKZMZg
It also corrects the border style for the search element when opening content in the up direction.