DioxusLabs / DioxusLabs/dioxus

SVGTitleElement not being created in dioxus web

Open
#4,371 0 comments 0 reactions 0 assignees View on GitHub
bug html
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

When creating an SVG, using a title element creates an HTMLTitleElement instead of an SVGTitleElement. It seems like the SVGTitleElement was commented out of dioxus-html because its name collides with the HTMLTitleElement https://github.com/DioxusLabs/dioxus/blob/5495bcedb406c26a84a06a77bc3a3b2702062677/packages/html/src/elements.rs#L1951

**Steps To Reproduce**

```rust
use dioxus::prelude::*;

fn main() {
dioxus::launch(App);
}

#[component]
fn App() -> Element {
rsx! {
svg {
height: "128",
width: "128",
title { "Hoverable Title" },
rect { height: "128", width: "128", fill: "#F00" }
}
}
}
```

**Expected behavior**

An SVGTitleElement should be created

**Environment:**

- Dioxus version: 0.7.0-alpha.1
- Rust version: nightly
- App platform: web

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.