newtaboverride icon indicating copy to clipboard operation
newtaboverride copied to clipboard

Please Keep the Address Bar empty when Its Background Color

Open amiga-500 opened this issue 4 years ago • 1 comments

I understand you trigger a html page to set the background color but because of that, when opening a new tab, i cant begin to use the address bar to type something without first having to clear the entire line. It's a bit cumbersome. Maybe u can load the webpage and clear the address bar by using javascript?

amiga-500 avatar Aug 26 '21 04:08 amiga-500

Unfortunately this is a bug/feature(?) and is potentially intended behavior. I also agree that this behavior shouldn't be like this, however it's a Mozilla issue.

HHCHunter avatar Feb 07 '22 08:02 HHCHunter

Hello, I have a good news for you. The bug that causes this (https://bugzilla.mozilla.org/show_bug.cgi?id=1409675) will occur ONLY if the New tab URL doesn't match the URL you have in your manifest file:

  "chrome_url_overrides" : {
    "newtab": "html/newtab.html"
  },

And that's what you are doing, for example when you select the "background color" option, you will use:

html/options.html

So what you should do instead is keep loading html/newtab.html no matter what, but detect that user has "background color" option and simply remove the body and set the background (for example). And your URL will remain empty.

Juraj-Masiar avatar Oct 19 '23 09:10 Juraj-Masiar