mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
Browser: Default page title to URL if no title is provided
This commit is contained in:
parent
aab022b77b
commit
e639c5bc25
1 changed files with 7 additions and 2 deletions
|
@ -197,8 +197,13 @@ int main(int argc, char** argv)
|
|||
};
|
||||
|
||||
html_widget.on_title_change = [&](auto& title) {
|
||||
s_title = title;
|
||||
window->set_title(String::format("%s - Browser", title.characters()));
|
||||
if (title.is_null()) {
|
||||
s_title = html_widget.main_frame().document()->url().to_string();
|
||||
}
|
||||
else {
|
||||
s_title = title;
|
||||
}
|
||||
window->set_title(String::format("%s - Browser", s_title.characters()));
|
||||
};
|
||||
|
||||
auto focus_location_box_action = GUI::Action::create("Focus location box", { Mod_Ctrl, Key_L }, [&](auto&) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue