mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
Browser: Mark the DOM tree as loaded before selecting any DOM node
The first thing that `set_selection` does is return early if the DOM- loaded flag is false. Set it to true so it can actually do something. This fixes inspecting a DOM node from the context menu.
This commit is contained in:
parent
4d356cfca5
commit
0aa375441a
1 changed files with 2 additions and 1 deletions
|
@ -138,11 +138,12 @@ void InspectorWidget::select_default_node()
|
|||
void InspectorWidget::set_dom_json(StringView json)
|
||||
{
|
||||
m_dom_tree_view->set_model(WebView::DOMTreeModel::create(json, *m_dom_tree_view));
|
||||
m_dom_loaded = true;
|
||||
|
||||
if (m_pending_selection.has_value())
|
||||
set_selection(m_pending_selection.release_value());
|
||||
else
|
||||
select_default_node();
|
||||
m_dom_loaded = true;
|
||||
}
|
||||
|
||||
void InspectorWidget::clear_dom_json()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue