mirror of
https://github.com/DioxusLabs/dioxus
synced 2025-02-16 13:48:26 +00:00
Enable External Links Without Modifier (#2983)
* make external links usable without modifier --------- Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
parent
21465390f8
commit
e7e624f05e
1 changed files with 3 additions and 3 deletions
|
@ -198,13 +198,13 @@ pub fn Link(props: LinkProps) -> Element {
|
||||||
if !event.modifiers().is_empty() {
|
if !event.modifiers().is_empty() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// only handle left clicks
|
// Only handle left clicks
|
||||||
if event.trigger_button() != Some(dioxus_elements::input_data::MouseButton::Primary) {
|
if event.trigger_button() != Some(dioxus_elements::input_data::MouseButton::Primary) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo(jon): this is extra hacky for no reason - we should fix prevent default on Links
|
// todo(jon): this is extra hacky for no reason - we should fix prevent default on Links
|
||||||
if do_default && is_external && cfg!(target_arch = "wasm32") {
|
if do_default && is_external {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue