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

[BUG] I believe an update bugged the position of element class _contentEditable_11eqz_352 _placeholder_11eqz_1034 #356

Closed
2 tasks done
hahhen opened this issue Feb 9, 2024 · 2 comments
Labels
bug Something isn't working released

Comments

@hahhen
Copy link
Contributor

hahhen commented Feb 9, 2024

If you want to ask for support or request features, sponsor the project and contact me over email.

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • I have read the documentation and cannot find an answer.

Describe the bug
A clear and concise description of what the bug is.

When the editor has no content, the element of class _contentEditable_11eqz_352 _placeholder_11eqz_1034 causes an overflow on some websites due to its position

To Reproduce

  1. Go to https://mdxeditor.dev/editor/demo
  2. Press F12 or inspect element
  3. Clear the editor
  4. Select the inside of the editor with Ctrl+Shift+C
  5. The element should be the second div inside element class mdxeditor-root-contenteditable
  6. Observe that there is a rectangle on the top that shouldn't be there.
    image

Expected behavior
That element should be cointained inside the editor, as in a previous version of the editor (the version of the picture is 2.3.4, I believe)

image

How to solve

I discovered the reason why this is happening:
The element in question has position absolute top 0, throwing it to the top of the page. The reason it was working in a previous version was that the class for the element (current version) mdxeditor-root-contenteditable was _rootContentEditableWrapper_11eqz_1047 (previous version). The last one has a position: relative css rule, making the element ._contentEditable_11eqz_352 _placeholder_11eqz_1034 be contained inside the editor.

Current version
image

Previous version
image

As I imagined, as soon as I replaced the new class for the old one, the div returned to its position.
Should be an easy fix, perhaps what happened was that when using the class in form of a variable (as the editor uses when creating elements), the variable mdxeditor-root-contenteditable was not converted into its value: _rootContentEditableWrapper_11eqz_1047.

@hahhen hahhen added the bug Something isn't working label Feb 9, 2024
@petyosi petyosi closed this as completed in 749e559 Feb 9, 2024
Copy link

github-actions bot commented Feb 9, 2024

🎉 This issue has been resolved in version 2.8.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@hahhen
Copy link
Contributor Author

hahhen commented Feb 9, 2024

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

1 participant