mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 23:50:19 +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
Notes:
sideshowbarker
2024-07-17 02:29:45 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/0aa375441a Pull-request: https://github.com/SerenityOS/serenity/pull/21782
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…
Reference in a new issue