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

dropdown position incorrect #5162

Closed
yshwaker opened this issue Apr 30, 2022 · 0 comments · Fixed by #5163
Closed

dropdown position incorrect #5162

yshwaker opened this issue Apr 30, 2022 · 0 comments · Fixed by #5163
Labels
css css-related bugs

Comments

@yshwaker
Copy link
Contributor

What happened?

if the page has a code block in it, the dropdown menu below that block positions incorrectly(align to the right).

it seems this bug is brought in by https://github.com/logseq/logseq/pull/5057/files#diff-804cdbc15af06aba05e572b8dcee83da9a495773a899aa35f8ce42bbaa6afce0R411

the change gets the width of the editor by query selecting the textarea. however, it seems we can have textarea elements in one page.

if a code block exists, the width of textarea created by code block is 0 somehow.
<textarea id="626cfb3c-08bb-4ba9-9951-6d5ba787856d" data-lang="python" style="display: none;">foo = 1 bar = 1</textarea>
image

Reproduce the Bug

  1. create a page
  2. create a code block
  3. create another block below the code block
  4. in the block created by 3, hit / to pop up the menu

Expected Behavior

the menu should align to the right.

Screenshots

image

Desktop Platform Information

Browser and App

Mobile Platform Information

No response

Additional Context

No response

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

Successfully merging a pull request may close this issue.

2 participants