Skip to content

Blazor casts cases of SVG objects #6507

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

Closed
higles opened this issue Jan 9, 2019 · 3 comments
Closed

Blazor casts cases of SVG objects #6507

higles opened this issue Jan 9, 2019 · 3 comments
Assignees
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-svg ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Milestone

Comments

@higles
Copy link

higles commented Jan 9, 2019

Describe the bug

I noticed this issue when working with clipPath on SVG elements. Blazor will automatically take the clipPath tag and cast it to all lower-case which doesn't work. I assume that it has some logic for taking all DOM tags and converting them to lowercase, which makes sense in most cases but this one is definitely case sensitive.

To Reproduce

  1. Take the following code snippet and place as the html for a component.
<svg width="200" height="200">
  <g clip-path="url(#myClip)">
    <rect width="200" height="200" fill="red"></rect>
    <clipPath id="myClip">
      <circle cx="100" cy="100" r="100" fill="none"></circle>
    </clipPath>
  </g>
</svg>
  1. Run the application
  2. Open the inspector and you will notice that "clipPath" has been replaced with "clippath"

Expected behavior

The desired result is to see a circular clipping of the red rectangle on the screen but you will see the full red rectangle instead.

Additional context

.Net Core version 2.1.502
Blazor version 0.7.0

@Andrzej-W
Copy link

@higles Where is the code snippet?

@higles
Copy link
Author

higles commented Jan 9, 2019

@Andrzej-W sorry, didn't mark it as code, so it wasn't showing up. Should be there now.

@mikaelm12 mikaelm12 added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates area-blazor Includes: Blazor, Razor Components labels Jan 9, 2019
@mkArtakMSFT mkArtakMSFT added bug This issue describes a behavior which is not expected - a bug. 1 - Ready labels Jan 9, 2019
@mkArtakMSFT mkArtakMSFT added this to the 3.0.0-preview3 milestone Jan 9, 2019
@mkArtakMSFT mkArtakMSFT modified the milestones: 3.0.0-preview6, Backlog Apr 19, 2019
@mkArtakMSFT mkArtakMSFT removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels May 9, 2019
@mkArtakMSFT mkArtakMSFT modified the milestones: Backlog, 5.0.0-preview2 Jan 23, 2020
@mkArtakMSFT
Copy link
Member

Closing as we will be tackling this as part of #18271

@mkArtakMSFT mkArtakMSFT added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label May 14, 2020
@ghost ghost added the Status: Resolved label May 14, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jun 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. feature-svg ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

7 participants