瀏覽代碼

Ladybird: Don't add initial about:blank load to history

The hackish initial loading of about:blank was previously added to the
history, so you could go back to it (which wasn't very ergonomic). Now
we set the m_is_history_navigation flag before loading it so it doesn't
get added to the history.
Baitinq 2 年之前
父節點
當前提交
15e4d151c3
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Ladybird/Tab.cpp

+ 2 - 0
Ladybird/Tab.cpp

@@ -114,6 +114,8 @@ Tab::Tab(BrowserWindow* window)
 
     // FIXME: This is a hack to make the JS console usable in new windows.
     //        Something else should ensure that there's an initial about:blank document loaded in the view.
+    //        We set m_is_history_navigation = true so that the initial about:blank doesn't get added to the history.
+    m_is_history_navigation = true;
     m_view->load("about:blank"sv);
 }