Zen URL bar floats immediately on New Tab with 'Floating Only When Typing' option
Captchas
- [x] I have read the instructions.
- [x] I have searched existing issues and avoided creating duplicates.
- [x] I am not filing an enhancement request.
- [x] I have checked that this issue cannot be reproduced on Mozilla Firefox.
- [x] I have checked that this issue can be reproduced once I removed all my Mods and Custom CSS.
What happened?
Selecting the default option of the Zen URL Bar behavior ("Floating only when typing") causes the URL address bar to float at the center of the window immediately without typing anything, as if the "Always floating" option were selected. Specifically, when clicking the + New Tab button or using the Ctrl + T shortcut.
Current behavior
The URL bar floats at the center of the window immediately upon clicking the + New Tab button or using the Ctrl + T shortcut to open a new tab, even if no typing has occurred.
Expected behavior
When opening a new tab either by clicking the + New Tab button or using the Ctrl + T shortcut with the "Floating only when typing" option selected, the URL address bar should automatically be focused with the blinking cursor visible in its standard (non-floating) position. The URL bar should only begin to float to the center of the window after the user starts typing.
Additional notes
-
The default option of the Zen URL Bar behavior ("Floating only when typing") was originally added on Dec 13, 2024 (commit c67fc71, version
1.0.2-b.2). At that time, it correctly floated the URL address bar only after the user began typing when clicking the+ New Tabbutton or using theCtrl + Tshortcut, making it consistent with the option's name. -
On Feb 3, 2025 (commit 20b0493, version
1.7.5b), thezen.urlbar.replace-newtabpreference was introduced and set totrueby default. This change caused a regression that broke the "Floating only when typing" behavior, causing the URL address bar to float at the center of the window immediately when clicking on the+ New Tabbutton or using theCtrl + Tshortcut. This behavior is now the same as the "Always floating" option, which is likely unintentional. -
The contributor @KiKaraage, who authored the zen-browser/docs@2b339a2 commit and @IAmJafeth, the docs maintainer who approved the PR, documented only the current behavior of the Zen URL Bar's floating options. They did not take into account the original intended behavior as designed when the feature was first introduced, as acknowledged by @KiKaraage in this comment. As a result, the current documentation should not be taken as a reference for the intended behavior, since it was written after a regression had already changed how the actual feature works.
-
Disabling the
browser.urlbar.suggest.topsitespreference (which corresponds to theShortcutssuggestions option in the browser settings):user_pref("browser.urlbar.suggest.topsites", false);causes the "Floating only when typing" option to behave closer to its original intended behavior, it floats only after typing begins. However, this breaks the "Always floating" option and behaves like "Floating only when typing", which is incorrect. Therefore, simply disabling
browser.urlbar.suggest.topsitesis not a recommended solution, but could serve as a simple temporary workaround.
Video Demonstration
🟢 Clicking on the address bar
- The address bar does not float to the center of the screen, even after the user begins typing.
- This appears to be the intended original behavior by design for this option when it was first introduced.
https://github.com/user-attachments/assets/614049d0-edc9-4195-9d13-f2461bf43b55
🔴 Clicking on the 'New Tab' button
- The address bar should float to the center of the screen only after the user begins typing, not immediately upon clicking the + New Tab button.
- This is not the intended original behavior.
- This behavior is identical to Always floating option.
https://github.com/user-attachments/assets/2fbb5a22-eee5-448b-837f-8826170b0864
🔴 Ctrl+T Shortcut
- The address bar should float to the center of the screen only after the user begins typing, not immediately upon using the Ctrl+T shortcut.
- This is not the intended original behavior.
- This behavior is identical to Always floating option.
https://github.com/user-attachments/assets/0b0c80e0-2f69-4a81-a832-e6583ef69df1
🟢 Ctrl+L Shortcut
- The address bar will float to the center of the screen immediately upon using the Ctrl+L shortcut, before the user begins typing.
- Strangely, this seems to be the intended original behavior by design for this option when it was first introduced.
- This behavior is identical to Always floating option.
https://github.com/user-attachments/assets/9900480f-4b36-49fd-b958-0fee3e05bce3
Version
1.7.5b to 1.12.5b (including 1.13t)
What platform are you seeing the problem on?
Linux (AppImage), Linux (Flatpak), Linux (Tarball), Windows - x64, Windows - aarch64
What component is this issue related to?
URL Bar
Relevant log output if applicable