Cannot launch custom URI from an extension without leaving an empty tab open
Reported by
nicholas...@gmail.com,
Oct 4
|
|||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36 Steps to reproduce the problem: An extension cannot open a custom URI link without opening a blank tab. I have created below an example that will create an extension that adds a context menu item to "launch the link with the custom URI" for all links on a page. On firefox, this works. It opens the custom action URI, then it prompts "Do you want to launch this in your CustomAppNameHere?" meanwhile the script closes the empty tab. But when it closes the empty tab the prompt stays. In chrome/chromium, when the tab is closed, so is the dialog to launch the page in the custom app. see comments on this question https://stackoverflow.com/questions/52639875/how-to-launch-a-custom-uri-from-an-extension-without-leaving-an-empty-tab-open?noredirect=1#comment92213224_52639875 for some other things we tried. function handleClick(info, tab) { chrome.tabs.create({ url: "customuri:/" + info.linkUrl }, function(newTab) { setTimeout(function() { chrome.tabs.remove(newTab.id); }, 250); } ); } chrome.contextMenus.create({ "title": "Open this link with a custom URI", "contexts":["link"], "onclick": handleClick }); Here is a pastebin of the same: https://pastebin.com/fuYFjSHN What is the expected behavior? It should open up the prompt to "Is it ok to open this link in CustomAppNameHere?" while also closing the empty tab that was used to get there. What went wrong? Leave an empty tab there, and all attempts to close that tab autmoatically failed. Did this work before? No Chrome version: 69.0.3497.100 Channel: stable OS Version: 10.0 Flash Version:
,
Oct 4
,
Oct 5
reporter@ - Thanks for filing the issue...!! Could you please provide a sample test file/url to test the issue from our end as navigating to https://pastebin.com/fuYFjSHN show some code only and no test file. A sample test file will help us in triaging the issue further. Thanks...!!
,
Oct 5
Hi first of all here is the steps to create your own custom protocol URI in Windows: https://gist.github.com/aleksey-bykov/d7d2bc61adf2da519f6844db87e023fa Here is the extension that demonstrates the problem https://drive.google.com/file/d/1r7HEwRe9ZE3g5CjiUsCuM6yoiZv-gR7k
,
Oct 5
The extension adds a "link" context menu. So just find a link in any page, then right click it, then say "Open link in dev custom protocol uri" it should reproduce the problem
,
Oct 5
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 15
As per comment #4 and comment #5, Able to reproduce the issue on reported chrome version 69.0.3497.100 also on latest chrome 72.0.3610.0 using Mac 10.14.0, Ubuntu 17.10 and Windows 10. Same behavior is seen on M60(60.0.3112.113) hence considering it as non-regression and marking it as Untriaged. Thanks! |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by phanindra.mandapaka@chromium.org
, Oct 4