[Pkg-mozext-commits] [tabmixplus] 09/20: Focus address-bar area if the selected tab is blank when Firefox starts

David Prévot taffit at moszumanska.debian.org
Thu Nov 16 18:58:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit 990391eef9edf4bdca10c2b0c12da21323e857a3
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sun Oct 15 18:44:34 2017 +0300

    Focus address-bar area if the selected tab is blank when Firefox starts
---
 chrome/content/tabmix.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 3e3ba7b..f9ea9fe 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -168,10 +168,14 @@ Tabmix.getAfterTabsButtonsWidth = function TMP_getAfterTabsButtonsWidth() {
 };
 
 Tabmix.afterDelayedStartup = function() {
+  // focus address-bar area if the selected tab is blank when Firefox starts
   // focus content area if the selected tab is not blank when Firefox starts
   setTimeout(() => {
-    if (gURLBar.focused && !gBrowser.isBlankNotBusyTab(gBrowser.selectedTab)) {
+    const isBlank = gBrowser.isBlankNotBusyTab(gBrowser.selectedTab);
+    if (gURLBar.focused && !isBlank) {
       gBrowser.selectedBrowser.focus();
+    } else if (!gURLBar.focused && isBlank) {
+      gURLBar.focus();
     }
   }, 250);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list