Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where menus were not positioning correctly with fixed position elements #177

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

seanconnollydev
Copy link

To reproduce the defect, add ment.io to an input or textarea whose ancestor has position: fixed. The menu will not always appear near the cursor (just under the '@' or target character in the input). To fix this, I check for position: fixed when iterating over each parent object during coordinate calculation. As soon as a fixed element is encountered, then we know to later set the position of the menu to fixed instead of absolute. Additionally, as the user scrolls the window, the menu stays with the input/textarea, which is desired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants