mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-06-11 01:25:53 -04:00
Merge pull request #2319 from lightpanda-io/fix-popup-close-queued-nav
On Window.close, remove any queued navigation
This commit is contained in:
@@ -555,6 +555,19 @@ pub fn close(self: *Window) void {
|
||||
}
|
||||
|
||||
_ = page.popups.swapRemove(popup_index);
|
||||
|
||||
// Drop any pending queued navigation for this frame. Frame.deinit will
|
||||
// release the QueuedNavigation arena, but the entry in page.queued_navigation
|
||||
// would otherwise have processQueuedNavigation re-deinit the popup.
|
||||
if (frame._queued_navigation != null) {
|
||||
for (page.queued_navigation.items, 0..) |f, i| {
|
||||
if (f == frame) {
|
||||
_ = page.queued_navigation.swapRemove(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
frame.deinit(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user