minibrowser: Reset the location field when switching tabs (#33316)

Signed-off-by: webbeef <me@webbeef.org>
This commit is contained in:
webbeef 2024-09-05 06:45:11 -07:00 committed by GitHub
parent e6ee879d2a
commit 7e493ba865
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -366,6 +366,7 @@ impl Minibrowser {
if let Some(event) =
Self::browser_tab(ui, label, webview.focused, webview_id)
{
location_dirty.set(false);
embedder_events.push(event);
}
}
@ -523,6 +524,7 @@ impl Minibrowser {
app_event_queue.push(EmbedderEvent::Reload(browser_id));
},
MinibrowserEvent::NewWebView => {
self.location_dirty.set(false);
let url = ServoUrl::parse("servo:newtab").unwrap();
app_event_queue.push(EmbedderEvent::NewWebView(url, WebViewId::new()));
},