-
Notifications
You must be signed in to change notification settings - Fork 892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closing last tab should open a new tab #14092
Conversation
105993b
to
45b427e
Compare
Are you sure we need this by default? E.g. personally I'm kinda used to the existing behavior. Do we have an input from the product team on this? |
+1 IMO, It would be better to have option and disabled by default? |
I got this failure on macOS when I do
|
Adding @rebron - should this be off by default? or maybe on by default only for macOS? I'm not sure I know of a browser that does this by default - and it's against what the OS behavior to open a new window after closing on Linux and Windows |
We should have this off by default probably even for macOS. |
@spylogsster can you create a profile preference for this (defaulted to false) and put a guard around the behavior? @rebron where should this setting live? I think a good place might be under System |
6bceab5
to
c851445
Compare
Default behaviour wasn't changed, users should go and enable it in options to keep browser opened |
5072fa6
to
a9eb316
Compare
I was thinking brave://settings/system but we had closing windows/quitting in Help Tips. |
@@ -9,6 +9,10 @@ | |||
pref="{{prefs.brave.enable_window_closing_confirm}}" | |||
label="$i18n{braveHelpTipsWarnBeforeClosingWindow}"> | |||
</settings-toggle-button> | |||
<settings-toggle-button class="cr-row" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put this on the system page actually? Great naming on the preference though - as it matches the Firefox setting name 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
58e63e9
to
9dcad4e
Compare
I still can see above failure after |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New placement looks great! 😄 👍
Good catch @simonhong - I see that crash too, with Ctrl + W |
Here's the stacktrace from the crash I get after hitting Ctrl + W. I think it's the same as @simonhong's (except I'm on Windows)
|
Fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ with one suggestion 👍🏼
browser/ui/brave_browser.cc
Outdated
return; | ||
} | ||
|
||
base::ThreadTaskRunnerHandle::Get()->PostTask( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the document (https://chromium.googlesource.com/chromium/src/+/lkgr/docs/threading_and_tasks.md#posting-to-the-current-virtual_thread), base::SequencedTaskRunnerHandle::Get()
is more preferred over base::ThreadTaskRunnerHandle::Get()
when posting to current thread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done, thanks!
67f698b
to
f7b1f27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ Looks good. New placement looks good in brave://settings/system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chromium_src/* LGTM
Noticed we have this on Android, although with different text: Which has the preference key cc: @rebron @spylogsster |
Resolves brave/brave-browser#1002
tabs.mp4
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: