Skip to content

Commit

Permalink
fix was_outside_clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
n00kii committed Jan 18, 2023
1 parent 32cc0c7 commit b06ec78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ impl Modal {
/// when [`Modal::open`] is used.
pub fn show<R>(&self, add_contents: impl FnOnce(&mut Ui) -> R) {
let mut modal_state = ModalState::load(&self.ctx, self.id);
self.set_outside_clicked(false);
if modal_state.is_open {
let ctx_clone = self.ctx.clone();
Area::new(self.id)
Expand Down Expand Up @@ -463,7 +464,6 @@ impl Modal {
if let Some(inner_response) = response {
ctx_clone.move_to_top(inner_response.response.layer_id);
}
self.set_outside_clicked(false);
}
}

Expand Down

0 comments on commit b06ec78

Please sign in to comment.