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

Conversation

Ernestas-t
Copy link
Contributor

Add zen.startup.focus-urlbar preference to control whether the URL bar is automatically focused when switching tabs during startup. Defaults to true to maintain current behavior while allowing users to disable this feature if desired.

It would also be good to have a toggle in the UI settings, but i think it's best to leave it for a separate commit.

Add zen.startup.focus-urlbar preference to control whether the URL bar
is automatically focused when switching tabs during startup. Defaults
to true to maintain current behavior while allowing users to disable
this feature if desired.
@Ernestas-t Ernestas-t requested a review from mr-cheffy June 12, 2025 15:43
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. Feature labels Jun 12, 2025
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants