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

Format text then remove format removes color style #914

Open
cameronvoell opened this issue Jun 12, 2020 · 1 comment
Open

Format text then remove format removes color style #914

cameronvoell opened this issue Jun 12, 2020 · 1 comment

Comments

@cameronvoell
Copy link
Contributor

cameronvoell commented Jun 12, 2020

Expected

Toggling a format on and off should not change the color attribute of text in the visual editor or html editor.

Observed

Toggling a format on and off removes text color alterations in the visual editor. In some cases the color attribute still exists in the html, toggling html mode on and off brings the color back in the visual editor. In other cases when toggling a format, the color is removed from the html.

Video:

color-disappears

Reproduced

Case 1 - Toggling format does not change html, switching html mode then back to visual brings color back:

  1. Highlight some text that has a color attribute but is NOT italicized
  2. Click italic button to italicize
  3. Click italic button again and notice italics are gone, and the color is not showing either
  4. Click HTML mode, notice the color attribute still exists for this element
  5. Return to visual mode and notice the color has returned

Case 2- Toggling format removes color attibute from html, toggling to html mode and back to visual does not bring the color back.

  1. Highlight some text that has a color attribute AND IS italicized (not in a list)
  2. Click italic button and notice italics are gone, and the color is not showing either
  3. Click HTML mode, notice the color attribute is gone
  4. Return to visual mode and verify that color does not return

Tested

[Samsung Galaxy Tab S3] on [Android 9] with [AztecEditor-Android v1.3.43]

@arctouch-felipevaladares
Copy link

arctouch-felipevaladares commented Jun 30, 2020

i found the source of the bug, InlineFormatter L:232, for some reason every time that we remove some format its also removing all the ForegroundColorSpan, i'll remove this on my PR for bg color #911

felipevaladares added a commit to felipevaladares/AztecEditor-Android that referenced this issue Jun 30, 2020
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

2 participants