on_load_end_browser_pane

Function on_load_end_browser_pane 

Source
pub fn on_load_end_browser_pane(state: &Arc<AppState>, browser: &Browser)
Expand description

Called from AgentMuxHandler::on_load_end when is_browser_pane is true.

Chromium creates a fresh Chrome_RenderWidgetHostHWND on every navigation. The subclass installed at on_after_created is on the OLD widget HWND, which was destroyed during navigation — so without reinstalling here, keyboard focus steals by the new page bypass our redirect and end up stuck on the pane.

Does NOT force focus back to main. WM_MOUSEWHEEL is routed to the focused HWND; stealing focus away from the pane breaks scrolling. The FocusHandler cancel + WndProc redirect already keep focus off the pane during the initial navigation focus steal.