Skip to content

Commit

Permalink
clear input_url when the toolbar is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
d0iasm committed Jun 1, 2024
1 parent 16ab0ff commit 6ccbe6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ui/wasabi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,6 @@ impl WasabiUI {
);
self.update_ui()?;

self.clear_address_bar()?;
self.input_url = String::new();
self.input_mode = InputMode::Normal;
} else if c == 0x7F as char || c == 0x08 as char {
// delete key
Expand Down Expand Up @@ -317,6 +315,8 @@ impl WasabiUI {
if relative_pos.1 < TOOLBAR_HEIGHT + TITLE_BAR_HEIGHT
&& relative_pos.1 >= TITLE_BAR_HEIGHT
{
self.clear_address_bar()?;
self.input_url = String::new();
self.input_mode = InputMode::Editing;
println!("button clicked in toolbar: {button:?} {position:?}");
return Ok(());
Expand Down

0 comments on commit 6ccbe6a

Please sign in to comment.