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

FireFox not respecting .eui-textBreakAll in all cases #2288

Closed
legrego opened this issue Sep 5, 2019 · 4 comments · Fixed by #2549
Closed

FireFox not respecting .eui-textBreakAll in all cases #2288

legrego opened this issue Sep 5, 2019 · 4 comments · Fixed by #2549
Assignees
Labels

Comments

@legrego
Copy link
Member

legrego commented Sep 5, 2019

This came out of researching elastic/kibana#44871 / elastic/kibana#44849:

I added eui-textBreakAll to a <p> tag in order to prevent a long URL from overflowing its container. This works great in Chrome, and even FF for most text strings.

However, Firefox refuses to break a long sequence of - characters, even with eui-textBreakAll set.

I discovered that adding overflow-wrap: break-word; to the eui-textBreakAll definition "fixes" this, but I'm not sure if it is the proper solution or not.

Reproducer: https://codesandbox.io/s/non-ascii-characters-ycp6h

@cchaos
Copy link
Contributor

cchaos commented Sep 5, 2019

Honestly, what you probably want is .eui-textBreakWord. This better handles not breaking a word if not necessary and it uses your solution of overflow-wrap: break-word so it works in Firefox.

Screen Shot 2019-09-05 at 12 03 47 PM

@legrego
Copy link
Member Author

legrego commented Sep 5, 2019

Honestly, what you probably want is .eui-textBreakWord. This better handles not breaking a word if not necessary and it uses your solution of overflow-wrap: break-word so it works in Firefox.

Good call, that does the trick for me! Do you know if there's a reason why eui-textBreakAll doesn't include overflow-wrap?

@cchaos
Copy link
Contributor

cchaos commented Sep 5, 2019

Because we didn't test for this case of weird characters.... It works fine in FF in our docs

@legrego
Copy link
Member Author

legrego commented Sep 5, 2019

Ok cool - I was just trying to figure out if this was a bug we should keep open, or if I was just misusing the classes. Turns out it's both!

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

Successfully merging a pull request may close this issue.

3 participants