Comments (7)
Might not be possible after all :(
http://stackoverflow.com/questions/6643634/focus-omnibar-in-google-chrome
from newtab-redirect.
Also, answered in the wiki under Why doesn't the URL bar focus?
from newtab-redirect.
Ops, sorry about that! Will check if the local page can handle an iframe pointing to a remote page. Thanks!
from newtab-redirect.
Trying with the empty local page still doesn't keep the focus on the address bar :(
from newtab-redirect.
Will try to find the newtab template and see if they do something special there.
from newtab-redirect.
No problem.
If you check out issue #4, I posted directions for tweaking the about:blank example from the chrome extensions developer page and specifying a single page (which loses the ability to update through an options page).
from newtab-redirect.
Will try to find the newtab template and see if they do something special there.
The focus of the address bar is done in-code.
As an example, check out the void Navigate(NavigateParams* params)
method here in which the navigation bar losing focus is done:
// If the user navigated from the omnibox, and the selected tab is going to
// lose focus, then make sure the focus for the source tab goes away from the
// omnibox.
if (params->source_contents &&
(params->disposition == NEW_FOREGROUND_TAB ||
params->disposition == NEW_WINDOW) &&
(params->tabstrip_add_types & TabStripModel::ADD_INHERIT_OPENER))
params->source_contents->web_contents()->Focus();
Although this is most likely not the exact code preventing the address focus, this is similar to why NewTab Redirect doesn't focus the omnibar. The logical execution of code is:
- load redirect.html
- focus omnibar (internal code)
- get user option (js)
- set page location (js)
- render user selected page
There are thousands of other things going on internally in the browser between the time you request a new tab and the time the page you've set in New Tab Redirect's options page actually loads.
from newtab-redirect.
Related Issues (20)
- Tabs not opening on firist Chrome session
- Default Chrome Apps are no longer showing up on NTR Apps Page HOT 1
- New tab opens when closing tabs
- Not working anymore HOT 1
- Management options via json/config file? HOT 2
- Feature request for preloading default URL HOT 1
- the new tab has changed over the last few days HOT 4
- Option to keep focus on browser address bar HOT 1
- Web page bet365.com won't load HOT 2
- Chrome Beta 118 restricted access to a local file in "New Tab Redirect" HOT 30
- Local file doesen't work HOT 3
- Local file stopped working on Brave 1.59.117 HOT 3
- Local file is working on chromium based browsers but not on google chrome itself HOT 4
- New permissions: "Read the icons of the websites you visit" HOT 3
- Redraw and other issues? HOT 2
- Local files not working HOT 9
- Data URLs
- Focus is on address bar on second tab opened
- White flash problem HOT 5
- bug: ' grant permission ' request and links to new tab instead of options. Also not syncing correctly.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from newtab-redirect.