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

Message box changes direction explicitly upon input change #3730

Merged
merged 1 commit into from
Aug 3, 2016

Conversation

pitamar
Copy link
Contributor

@pitamar pitamar commented Jul 10, 2016

@RocketChat/core

Message box does not handle well text consisting of both left-to-right and right-to-left parts. (Arch linux, Chrome version 51.0.2704.84 (Official Build) (64-bit))
Here is the behavior I experience when clicking only the left arrow:
before
Notice the skip over the space in the middle and the jump to the start right before the end.
After:
after

It seems to be a bug with how chrome handles dir="auto" in textareas (Firefox seems better, but not perfect. Other browsers might have problems too, I did not test).
This fix explicitly sets dir="ltr" or dir="rtl" depending on the input.
The problem I see with this fix is that now the entire message has the same direction. Ideally each line could have its own direction, but I couldn't a better solution.

@rodrigok
Copy link
Member

@RocketChat/core What do you think about this PR?

@rodrigok rodrigok merged commit eff538b into RocketChat:develop Aug 3, 2016
@engelgabriel engelgabriel mentioned this pull request Aug 12, 2016
@marceloschmidt marceloschmidt added this to the 0.37.0 milestone Sep 5, 2016
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.

3 participants