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: modals positions once again #5163
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @yshwaker. Glad that you fixed this issue. Great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry. I merged in #5193 and didn't see that this PR also solves a similar issue. Does this PR fix any other bugs that the other PR doesn't solve? If not, I'm be inclined to stick with that solution |
@logseq-cldwalker it fixed the same issue, but i'm not sure if the added |
Oops, sorry I didn't notice that you created this PR earlier and I agree your solution is cleaner than mine. |
@pengx17 no worries. |
@yshwaker Sounds good. If you can update the conflict, we can test it again |
@logseq-cldwalker sorry for the late reply. just resolved the conflict. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yshwaker Works great! Thanks for the fix 🐛 ⚡
fixes #5162
Getting the width of editor from textarea element is not reliable sometimes, especially when there are code blocks in it.
This pr tries to fix the position by getting the width from
.editor-wrapper
. iirc, the element with this class represent the current active block area and it seems to be unique which should be safe to get the editor width(I Hope).