DioxusLabs / DioxusLabs/dioxus

Access to the event target property

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

Description

## Feature Request

There is currently no way to access the [`event.target`](https://developer.mozilla.org/en-US/docs/Web/API/Event/target) property (like the clicked element for `onclick` events) from the Rust event handlers. This makes it hard or impossible to do dynamic events based on the clicked elements or events that affect the clicked elements).

This was already requested in #2590, but that issue was closed without a proper solution, as `web_event` does not work for native and mobile targets.

## Implement Suggestion

There should be a way to access (and potentially modify) the event target element of the event.

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.