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

Rich text control: Underline is in black despite font color being green #70

Closed
jesomekh opened this issue Jun 13, 2018 · 3 comments
Closed

Comments

@jesomekh
Copy link

image

if you highlight the word, then change the font color again, then it will change to the correct color.

@JiuqingSong
Copy link
Contributor

Can you provide a repro step?

Thanks.

@jesomekh
Copy link
Author

jesomekh commented Jun 19, 2018

Essentially, if you change the font color of a piece of text which is underlined, then the font color of the text will change BUT the underline color will not change (as pictured). You see in the screenshot the text is green but the underline is black. Once you highlight the text again and change the color, then the underline will swap to the new font color.

@Adjective-Object
Copy link
Contributor

Afaict this has to do with the order of the and elements

If the underline is a parent of the style, it will be the parent text colour (in this case black)
if the underline is a child of the style, it will be the child text colour (in this case green).

Possible fixes as I see it

  • Introduce ul normalization (e.g. if a ul has only one child, switch their orders so the child is the parent of the ul
  • when setting ul on an element, if the selected text is an entire inline element, make the ul a child of the inline element instead of a parent.

Thoughts @JiuqingSong ?

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

No branches or pull requests

3 participants