DioxusLabs / DioxusLabs/dioxus
SVGTitleElement not being created in dioxus web
- 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.