-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vimium on new-tab page #1515
Comments
Anyone know any way to make it work with Momentum? (https://chrome.google.com/webstore/detail/momentum/laookkfknpbbblfpciffpaejjkokdgca?utm_source=chrome-app-launcher-info-dialog) |
... and Chrome doesn't run other extensions on such pages. |
My experience is different than yours. Setting the new tab page to Is your plugin really necessary? Doesn't Chrome's native new tab setting suffice? |
@leoj3n. You're right, for tabs opened with |
Ohhh got ya. |
I think I might need to open a new issue - but it appears that only I am facing it. |
The docs for
If this isn't working properly, it sounds like a Chrome bug. Have you tried restarting the browser/reloading Vimium, to see if that makes a difference? |
I don't think this is something we need to consider unless this is an issue for multiple people. But it would be tidier UX to just resolve relative urls manually (like chrome says it should), if this is an issue. A |
Test Report
Any other testing suggestions? My js-foo is a bit rusty, so I didn't attempt full debugging of PR #1508 . If you have any suggestions/hints I will be happy to give it another shot to PR #1508 . Till then, I think we should block PR #1508. Cheers, |
After little bit of digging around, it appears that convertToUrl: (string) ->
string = string.trim()
# Special-case about:[url], view-source:[url] and the like
if Utils.hasChromePrefix string
string
else if Utils.isUrl string
Utils.createFullUrl string
else if string is "pages/blank.html"
string
else
Utils.createSearchUrl string This may or may not be the right way to go. Note that the fix introduces an extension specific string literal If this is acceptable then let me know and I will create another issue/PR with the fix. Cheers, |
Thanks for detective work, @wadkar. With the fix you propose, typing A better alternative would be to find where the new tab setting is used (here), and replace it with the full URL directly. This is the only place where |
Changing createTab: (callback) -> openUrlInNewTab { url: Settings.get("newTabUrl") }, callback to createTab: (callback) -> openUrlInNewTab {
url: Settings.get("newTabUrl")
rawUrl: true
}, callback and openUrlInNewTab = (request, callback) ->
chrome.tabs.getSelected null, (tab) ->
tabConfig =
url: Utils.convertToUrl request.url
index: tab.index + 1
selected: true
windowId: tab.windowId
# FIXME(smblott). openUrlInNewTab is being called in two different ways with different arguments. We
# should refactor it such that this check on callback isn't necessary.
callback = (->) unless typeof callback == "function"
chrome.tabs.create tabConfig, callback to openUrlInNewTab = (request, callback) ->
chrome.tabs.getSelected null, (tab) ->
chrome.tabs.create {
url: if request.rawUrl then request.url else Utils.convertToUrl request.url
index: tab.index + 1
selected: true
windowId: tab.windowId
# FIXME(smblott). openUrlInNewTab is being called in two different ways with different arguments. We
# should refactor it such that this check on callback isn't necessary.
}, -> callback?() should achieve exactly what we want (and IMO makes |
Yep, I agree I think we should create a separate issue/PR for this and link #1507 #1508 against it. I am making a separate branch for this and testing @mrmr1993 's suggestion - stay tuned. Cheers, |
PR philc#1508 introduced another issue that setting vimium's `newTabURL` to the inbuilt `pages/blank.html` resulted in opening a new tab with search query set to `pages/blank.html`. This commit solves the issue by conditionally calling `Utils.convertToUrl`. Also, it changes `openOptionsPageInNewTab` call to use `openUrlInNewTab` for consistency and reduce usage of `chrome.tabs.create` API call. Note that this may not solve philc#1507 as chrome seems to open `chrome-extension://...` URLs in _non-incognito_ window *by design*. You may want to set it to (some other blank page)[1] so that it can be accessed from incognito mode. You can always open `chrome://newtab` from incognito window. [1] http://this-page-intentionally-left-blank.org/
So, I followed through @mrmr1993 's changes and created PR #1532 . It certainly fixes some issues (setting aside incognito mode). To be honest, I am not sure as to why Test 1 above should ever pass for incognito windows. I don't suppose chrome allows opening of As such, setting |
@leoj3n : As I understand it, leoj3n has set Chrome's new tab url to
|
Is this the same issue as being unable to remove the vimium exclusion on |
Ah. Unfortunately, like nikess, I would've liked it to work with an extension (SpeedDial2), even if browser focus snapped to the omnibar to start. Thanks though! |
To use vimium commands after creating a new tab with |
I have this problem with Chrome 59.0.3071.86. It doesn't matter what is focused. If you are on the new tab page, vimium doesn't work at all. You have to navigate to a real webpage for it to work. |
I have the same issue described by Chekote. |
I've got the same issue. After creating a new tab, vimium ceases to do anything at all, regardless of focus. You have to navigate to a different webpage before it begins working. Version 62.0.3202.94 (Official Build) Built on Ubuntu , running on Ubuntu 16.04 (64-bit) |
I should have searched more carefully! The issue is addressed here #2845 |
When creating a new tab with
Ctrl-T
, Vimium is not active and the focus is locked in the address bar. The whole Vimium UX is broken.Absent a Vimium fix, I've been using New Tab Redirect to redirect
chrome://newtab
to a blank page with a very-long TTL (on which Vimium is active). Unfortunately, we can't do the same trick in Vimium. First, it completely disableschrome://newtab
(and it wouldn't be possible to have an option to re-enable it). Second, redirecting topages/blank.html
still leaves the focus in the address bar.As a super lightweight alternative to New Tab Redirect, I implemented this:
(which might be of interest to some Vimium users, absent a Vimium solution).
The text was updated successfully, but these errors were encountered: