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

Icon component causes invalid or unexpected content error #16844

Open
narthur opened this issue Jul 31, 2019 · 3 comments
Open

Icon component causes invalid or unexpected content error #16844

narthur opened this issue Jul 31, 2019 · 3 comments
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended

Comments

@narthur
Copy link

narthur commented Jul 31, 2019

Describe the bug
Using the Icon component in a Gutenberg block results in invalid content error on editor refresh. The "Resolve" action shows that it wants to change the SVG "viewbox" attribute to "viewBox"

To reproduce
Steps to reproduce the behavior:

  1. Use a block containing the wp.components.Icon component.
  2. Save the page.
  3. Refresh the editor.
  4. Notice the invalid content error, and click "Resolve" to see found difference.

Expected behavior
Using wp.components.Icon should not trigger an invalid content error.

Screenshots

Screen Shot 2019-07-31 at 3 49 51 PM

Desktop:

  • OS: macOS Mojave 10.14
  • Browser: Chrome 75.0.3770.142

Additional context

  • WordPress 5.2.2
@narthur
Copy link
Author

narthur commented Jul 31, 2019

I looked up the Icon component source file and the SVG primitive source file. However it wasn't immediately apparent to me how to go about fixing the issue.

@narthur
Copy link
Author

narthur commented Aug 1, 2019

I switched away from using the Icon component, and found that I was still receiving the error. This time it looks like el('a' ... ) is at fault, as extra parameters being injected seem to be causing the validation to fail:

Screen Shot 2019-08-01 at 9 34 23 AM

@swissspidy swissspidy added [Package] Components /packages/components [Feature] UI Components Impacts or related to the UI component system labels Aug 1, 2019
@jordesign
Copy link
Contributor

Hi @narthur - just checking in to see if you still find this issue in place?

@jordesign jordesign added [Type] Bug An existing feature does not function as intended [Status] Needs More Info Follow-up required in order to be actionable. labels Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Status] Needs More Info Follow-up required in order to be actionable. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants