-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Problem
Hello,
I didn't test all events so some may also be bugged, but since 68d2fdb onblur and onscroll doesn't works. onfocusout can be used in place of onblur but there is no equivalent for the onscroll event.
Steps To Reproduce
use gloo::console;
use yew::prelude::*;
pub struct Model;
impl Component for Model {
type Message = ();
type Properties = ();
fn create(_ctx: &Context<Self>) -> Self {
Self
}
fn view(&self, ctx: &Context<Self>) -> Html {
let onblur = ctx.link().callback(|_| {
console::log!("Blur"); // Doesn't works
});
let onfocusout = ctx.link().callback(|_| {
console::log!("Focus out"); // Works
});
let onscroll = ctx.link().callback(|_| {
console::log!("Scroll"); // Doesn't works
});
html! {
<>
<button {onblur} {onfocusout}>{"Click me then click outside"}</button>
<div style="height: 500px; overflow-y:auto" {onscroll}>
<div style="height: 1000px">{"Scroll me"}</div>
</div>
</>
}
}
}
fn main() {
yew::start_app::<Model>();
}Environment:
- Yew version:
master - Rust version:
1.54.0 - Browser: tested on latest
FirefoxandEdge
Cheers.
Reactions are currently unavailable