web: scroll to top when viewing a new tag
This commit is contained in:
parent
e570202ba2
commit
e81a452dfb
@ -1008,7 +1008,12 @@ pub fn view_tags(model: &Model) -> Node<Msg> {
|
||||
},
|
||||
],
|
||||
display_name,
|
||||
IF!(t.unread>0 => format!(" ({})", t.unread))
|
||||
IF!(t.unread>0 => format!(" ({})", t.unread)),
|
||||
ev(Ev::Click, |_| {
|
||||
// Scroll window to the top when searching for a tag.
|
||||
info!("scrolling to the top because you clicked a tag");
|
||||
web_sys::window().unwrap().scroll_to_with_x_and_y(0., 0.);
|
||||
})
|
||||
]]
|
||||
}
|
||||
fn matches(a: &[&str], b: &[&str]) -> usize {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user