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

Limit the Markdown Editor width in Edit (not New) Mode to prevent overflow #4356

Merged
merged 1 commit into from
Jun 9, 2020

Conversation

infinite-persistence
Copy link
Contributor

@infinite-persistence infinite-persistence commented Jun 9, 2020

PR Type

What is the current behavior?

The MDE width overflows as you type. Affects Edit Mode only (New Mode works fine).

What is the new behavior?

The MDE used in the "new" section has a parent width parameter to limit itself, while the MDE used in the "edit" section didn't.

Fix by limiting ".comment__body_container" to 80%, which takes into account the space taken by the author's avatar. This feels a little bit dirty since it's hard-coded. If there's a way to calculate the avatar width from here, it will be more robust.

image

…rflow.

The MDE used in the "new" section has a parent width parameter to limit itself, while the MDE used in the "edit" section didn't.

Fix by limiting ".comment__body_container" to 80%, which takes into account the space taken by the author's avatar. This feels a little bit dirty since it's hard-coded.  If there's a way to calculate the avatar width from here, it will be more robust.
@neb-b neb-b merged commit 8068279 into lbryio:master Jun 9, 2020
@infinite-persistence infinite-persistence deleted the edit-overflow branch June 14, 2020 11:48
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.

Editing a published comment with long string causes width overflow
2 participants