jimschubert / NewTab-Redirect

NewTab Redirect! is an extension for Google Chrome which allows the user to replace the page displayed when creating a new tab.
MIT License
483 stars 89 forks source link

Omnibar autofocus stopped working in Chrome 82.x #174

Closed Abromeit closed 4 years ago

Abromeit commented 4 years ago

I know that the API behind this feature is experimental, but maybe you can look into it anyway. There are already some reviews in Chrome Webstore mentioning this issue.

rdhar commented 4 years ago

Sad to confirm the same is true of Chrome v83 :/

Chrome 83.0.4103.14 (Official Build) beta (64-bit)

OS Windows 10 OS Version 1903

tomholford commented 4 years ago

Same here, on Linux:

Chrome 83.0.4103.61 (Official Build) (64-bit)

OS Linux 4.15.0-91-generic Ubuntu x86_64 GNU/Linux

ghost commented 4 years ago

Same issue, with:

Chrome Version 83.0.4103.61 (Official Build) (64-bit)

OS Linux 5.3.0-51-generic # 44~18.04.2-Ubuntu SMP Thu Apr 23 14:27:18 UTC 2020 x86_64 GNU/Linux

C-LOYBOY commented 4 years ago

same... just stopped working sometime ago, maybe weeks, maybe months.

daniel347x commented 4 years ago

I've loved New Tab Redirect for years, but due to this recent problem, I was glad to discover another extension that does not have this problem: "Fast New Tab Redirect".

I may come back to "New Tab Redirect" if/when the current problem is resolved, but for now, I have to disable it.

Edddy commented 4 years ago

I've loved New Tab Redirect for years, but due to this recent problem, I was glad to discover another extension that does not have this problem: "Fast New Tab Redirect".

Thanks for the suggestion, but does not work with local files (i.e. file:///C:/Users/User/Documents/start.htm)

dkaksl commented 4 years ago

I have used this extension for years now, and this new glitch has allowed me to see how Chrome's built-in new tab page is customizable and actually fulfills all the requirements I had.

If anyone is interested in what I'm talking about, there's a pencil button in the bottom right of the new tab page.

So, I'm out. :)

m5g commented 4 years ago

I've loved New Tab Redirect for years, but due to this recent problem, I was glad to discover another extension that does not have this problem: "Fast New Tab Redirect".

"Fast New Tab Redirect" has same issue (((

BarbossHack commented 4 years ago

Fast New Tab Redirect is perfect and works like a charm 👍

darkquake93 commented 4 years ago

But I like to redirect to chrome://apps, and that's not working in Fast New Tab Redirect because it tries to look up the host "chrome". Anyone got that working?

In the meantime best I can do is stay with this Extension & Remember to use Alt+D till it's fixed :p

MoltenOre commented 4 years ago

But I like to redirect to chrome://apps, and that's not working in Fast New Tab Redirect because it tries to look up the host "chrome". Anyone got that working?

In the meantime best I can do is stay with this Extension & Remember to use Alt+D till it's fixed :p

Short term solution is to remove the addres you redirect to. You have auto selectet the searchbar and have the apps just not that beautiful.

sysqo82 commented 4 years ago

I've loved New Tab Redirect for years, but due to this recent problem, I was glad to discover another extension that does not have this problem: "Fast New Tab Redirect".

I may come back to "New Tab Redirect" if/when the current problem is resolved, but for now, I have to disable it.

Thank you, unfortunately it doesn't work for chrome://apps

darkquake93 commented 4 years ago

But I like to redirect to chrome://apps, and that's not working in Fast New Tab Redirect because it tries to look up the host "chrome". Anyone got that working? In the meantime best I can do is stay with this Extension & Remember to use Alt+D till it's fixed :p

Short term solution is to remove the addres you redirect to. You have auto selectet the searchbar and have the apps just not that beautiful.

Yes that's a good short term solution, of course I'd prefer having my beautiful apps with the Steam theme :p It was working for quite a while so not sure what's broken it recently. Maybe Chrome changed some OmniBar focus Functions, so previous API calls are no longer recognised. I'm using your solution in the meantime though, cheers, as I'd rather have the focus than the correct Apps page showing. When it's fixed I'll switch back :)

Nerdwiththehat commented 4 years ago

In the meantime, for us poor misbegotten users of chrome://apps who want to find a way to keep using this excellent extension and get the omnibox focus back, I've cobbled together a quick little AHK script that just auto-fires CTRL+L whenever you hit CTRL+T in Chrome:

#IfWinActive,ahk_exe chrome.exe
^t::
Send, ^t
sleep, 200
Send, ^l
Return

If I make this a bit fancier, I could set it so it only fires in your main instance of Chrome, and listens for if you hit the New Tab button, too, but this is all I can bother to do in about five minutes of work. Hope it helps!

jimschubert commented 4 years ago

Fast New Tab Redirect is perfect and works like a charm

A word of caution...

There's no technical way for an extension which redirects to a user defined URL to focus the omnibar. The browser has two different thread pools, one for extensions and pages and another for the "chrome" (the browser application itself). The redirect is done either by HTML or Chrome APIs on the first (page) pool, and the omnibar focus is done via the second (browser) pool. Any extension which appears to be consistent in the behavior is just lucking out on the race condition.

The word of caution is that users should not blindly switch to any extension which has access to all sites. This will allow the developer to gain access to any of your online data.

As an alternative approach, you can follow any one of my examples within this repository to create a custom new tab page.

piotrnar commented 4 years ago

Thank you - a custom new tab page was the way to do it for me. Didn't know it was possible and would be so easy :)

Just remember to rename manifest.txt to manifest.json

BarbossHack commented 4 years ago

Fast New Tab Redirect is perfect and works like a charm

A word of caution...

There's no technical way for an extension which redirects to a user defined URL to focus the omnibar. The browser has two different thread pools, one for extensions and pages and another for the "chrome" (the browser application itself). The redirect is done either by HTML or Chrome APIs on the first (page) pool, and the omnibar focus is done via the second (browser) pool. Any extension which appears to be consistent in the behavior is just lucking out on the race condition.

The word of caution is that users should not blindly switch to any extension which has access to all sites. This will allow the developer to gain access to any of your online data.

As an alternative approach, you can follow any one of my examples within this repository to create a custom new tab page.

Yeah I’ve tried this before, but each time I start GoogleChrome it ask me if I want to keep this extension (as it is not published on the ChromeWebStore), annoying, do you have a solution for this ?

brendanfalkowski commented 4 years ago

FYI all, Chrome team has been working on this for about 2 weeks: https://bugs.chromium.org/p/chromium/issues/detail?id=1085779#c38

They agreed that an internal change in 83 caused a regression. They weren't aware extensions relied on that race condition going in their favor (or certain if other extensions expected the opposite), but I'm assuming it's been fast-tracked because an extension blocking Omnibar is a red flag for that product team.

The fix is being tested, and should be part of Chrome 84 it looks like.

jimschubert commented 4 years ago

Yeah I’ve tried this before, but each time I start GoogleChrome it ask me if I want to keep this extension (as it is not published on the ChromeWebStore), annoying, do you have a solution for this ?

I have a few local extensions and I don't get this message, but I guess I have developer mode always enabled. You could try that, maybe.

BarbossHack commented 4 years ago

Yeah I’ve tried this before, but each time I start GoogleChrome it ask me if I want to keep this extension (as it is not published on the ChromeWebStore), annoying, do you have a solution for this ?

I have a few local extensions and I don't get this message, but I guess I have developer mode always enabled. You could try that, maybe.

In fact I already am in developer mode, and I see this popup everytime I open Chrome (if I have unpublished extensions) : https://i.imgur.com/UXiiYZk.jpg

Can you explain how do you install them ? I use the "Load unpacked" button in chrome://extensions/ and I choose my extension folder

jimschubert commented 4 years ago

@BarbossHack sorry I didn't see your question earlier.

I googled that warning, and it seems like it might be a Windows only thing which would explain why I don't see it. You can search for something like "Chrome disable developer mode popup" and find quite a few articles for suppressing this. Unfortunately I don't have a Windows machine with Chrome, so I can't verify and write out the steps.

Abromeit commented 4 years ago

I just confirmed the Omnibar autofocus is working again in Chrome v85.

Likely due to the chromium issue 1085779, mentioned by @brendanfalkowski , which is now marked as fixed.

Therefore i'm closing this issue.

brendanfalkowski commented 4 years ago

Just got Chrome 84 (normal channel) and the fix reported to Chrome was released + is working with the extension. Yes!

darkquake93 commented 4 years ago

Just got Chrome 84 (normal channel) and the fix reported to Chrome was released + is working with the extension. Yes!

Yep I confirm; just updated too and I've got focus back when I redirect to chrome://apps! Yay :)

vitaliyhayda commented 4 years ago

Works in Chrome v84+, make sure to enable the first checkbox in the extension