Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not activate nested dropdowns together #6830

Merged
merged 2 commits into from
May 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl Widget {

fn init_dropdown_focus(&self, ctx: &super::ConfigContext) -> frp::Stream<bool> {
let widgets_frp = ctx.frp();
let focus_receiver = self.display_object.clone_ref();
let focus_receiver = &self.dropdown_wrapper;
let focus_in = focus_receiver.on_event::<event::FocusIn>();
let focus_out = focus_receiver.on_event::<event::FocusOut>();
let network = &self.config_frp.network;
Expand All @@ -215,7 +215,7 @@ impl Widget {
// Otherwise the animation finishes within single frame, which looks bad.
let close_after_selection_timer = frp::io::timer::Timeout::new(network);
close_after_selection_timer.restart <+ dropdown_frp.user_select_action.constant(1);
eval close_after_selection_timer.on_expired((()) focus_receiver.blur());
eval_ close_after_selection_timer.on_expired(focus_receiver.blur());

}
is_open
Expand Down Expand Up @@ -263,7 +263,7 @@ impl Widget {
let widgets_frp = ctx.frp();
let styles = ctx.styles();
let activation_shape = &self.activation_shape;
let focus_receiver = &self.display_object;
let focus_receiver = &self.dropdown_wrapper;
frp::extend! { network
is_hovered <- widgets_frp.on_port_hover.map2(&config_frp.current_crumbs, |h, crumbs| {
h.on().map_or(false, |h| crumbs.starts_with(h))
Expand Down