fix(servoshell): blank view when close non focused tab (#35569)

Signed-off-by: Jason Tsai <git@pews.dev>
This commit is contained in:
Jason Tsai 2025-02-21 14:10:13 +08:00 committed by GitHub
parent d4a8b3b38e
commit 9c8a47e993
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -240,8 +240,10 @@ impl RunningAppState {
inner.webviews.retain(|&id, _| id != webview_id);
inner.creation_order.retain(|&id| id != webview_id);
inner.focused_webview_id = None;
inner.dialogs.remove(&webview_id);
if Some(webview_id) == inner.focused_webview_id {
inner.focused_webview_id = None;
}
let last_created = inner
.creation_order