Skip to content

feat: add preference to toggle URL bar autofocus on startup #8990

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

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/browser/app/profile/features.inc
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ pref('zen.haptic-feedback.enabled', true);

// Startup flags
pref('zen.startup.smooth-scroll-in-tabs', true);
pref('zen.startup.focus-urlbar', true);
6 changes: 5 additions & 1 deletion src/zen/workspaces/ZenWorkspaces.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,11 @@ var gZenWorkspaces = new (class extends ZenMultiWindowFeature {
gZenVerticalTabsManager._canReplaceNewTab
) {
// Only set up URL bar selection if we're switching to a different tab
if (gBrowser.selectedTab !== this._emptyTab && selectURLBar) {
if (
gBrowser.selectedTab !== this._emptyTab &&
selectURLBar &&
Services.prefs.getBoolPref('zen.startup.focus-urlbar', true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isnt the correct call as it woudnt just be on startup. Rather dont call openTab on selectStartpage

) {
// Use a Promise-based approach for better sequencing
const urlBarSelectionPromise = new Promise((resolve) => {
const tabSelectListener = () => {
Expand Down