i had took a look to another threads about chrome and custom protocol apps, but i couldn't resolve a doubt i've got. In my web app, when you click a button it fire a new tab with an webpage (window.open(url, "_blank")). The new tab is opened with the url (annother web app with https protocol). This url fire a javascript function on load that verifies some things and then generate a custom url, for example myurl://base64code, and put it in an existing iframe in this way windows.frames['myframe'].location.href=theCustomProtocolUrl. i tried in different ways (location.replace, create a new iframe and set the url, etc) and i always have the same problem. If i refresh (ctrl f5) the page it always show the dialog or if i open the link with the developer console opened. But if i click my button and the page is opened in a new tab it doesn't work only if i refresh (ctrl+f5). This works perfectly on IE11, it launch the app directly.
Any ideas why chrome, and edge, works like this?
UPDATE: I have found the reason, is i use the protocolcheck.js (https://gist.github.com/vladimirtsyupko/cfcd332476b16683bb0b) library.
First i tried to open a protocol with the timeoutHack (it use blur event) and then, after failing, it fires the other url (in this case https) and the dialog doensn't appear. I found a bug with blur event on chrome > 85 https://bugs.chromium.org/p/chromium/issues/detail?id=1137801
Thanks in advance
I have been having a very odd problem in all Salesforce orgs, but only when using Chrome.
If I go to Setup, and click on a "classic" setup link, like "users", instead of opening it in the iframe within lightning, it attempts to open it in a new browser tab. The page renders, but none of the links or javascript do anything.
I have seen advice that says to avoid a plugin called "Ghostery" but I am not using that, and have turned off other browser extensions but nothing works. This is not happening for anyone else I know using chrome and salesforce, which leads me to believe it is some Chrome configuration setting, but I don't know what to look for.
I have a single page PHP application that fetches data from a third party API and outputs the items in a product grid. Clicking on one of the products leads to an external url which opens in the same window.
When using the back button in Chrome to go back på the application after clicking the external link, the page reloads for some reason. I'm only experiencing this problem in Chrome, therefore I'm wondering if it could be a Chrome related bug?
Found the issue. It was caused by using a window load event incorrectly.
Chrome is my default browser. My problem is when I click page any content/hyperlink it’s open a new popup window and redirect my page on another ad-page.
I already install Ad-Block extension,but it’s not solve my problem.
What to do?
Check your addons and or plugins and disable everything you don't need!
The restart your browser and see if it still happens
chrome://extensions/
chrome://plugins/
What combination of html and IE8 settings get IE8 to open links in a new tab. Or can you not do this with IE8, and you only get the new tabs by manually selecting File-> new/duplicate tab?
My website works in Firefox - pages on the site load in the current tab, and links off site load a new tab. IE8 won't behave: target="_blank" opens a whole new window; the other options, _self _top _parent, all open the page in the current tab.
I have Firefox set to "Open new windows in a new tab." The links to pages on my site all have target="_self" and Firefox keeps these in the current tab. On the external links I don't have a target set (I added _blank to see if it fixed IE8, and doing that didn't affect Firefox).
I can't find an equivalent setting in IE8. Tools-Internet Options-General-Tabs/Settings has an enable tabs box, and a sub-option to automatically switch to newly opened tabs. Is there some html that will work? An IE8 setting I'm missing?
Any help appreciated.
It is not a thing you can control from HTML code, as it should be user's, not document author's decision how to open a link.
To open pop-up windows in new tab, follow instructions from IE8 help:
To change how pop-ups are displayed
In Internet Explorer, click the Tools
button, and then click Internet
Options. Click the General tab, and
then, in the Tabs section, click
Settings. Make a selection in the
When a pop-up is encountered section.
Click OK twice.
Updated:
Reading OPs comments to other posts, it seems like the intent is to make all external links open in new tabs. However, it is not document author's choice how the client should open any link in any page - it has to be decided by the client. Moreover, even though you can create a client-side script which sets "target" property to open pop-up windows, there is no notion of "tab" in Document Object Model and hence you cannot do it even in a script.
The answer to the question was posted in the comments (but is now deleted). Now you can test it in IE8 - just use the middle mouse button to open the link in a new tab. Firefox does work better with tabs.
How the browser interprets the target is browser dependent - each vendor will specify what they want. Firefox decided to use a new tab, IE decided to use a new window.
The html 4.01 spec has this to say on "_blank":
The user agent should load the designated document in a new, unnamed window.
The spec predates the wide usage tabbed browsing now has, so doesn't mention the concept anywhere.
Opening a page in a new tab is concept that believe is not covered by the html standard. The Firefox behavior is just a setting in the browser, which IE8 might or might not have.
On a related note, I personally find it abusive of websites to make the choice of opening a page in a new tab/window. What if I want it to open in the current tab/window?
Of course, in a rich application-like site that is basically entirely an application I find it convenient that pages open in a new tab/window. This makes them work more like desktop apps
For normal pages, I would suggest not setting the target at all and let the user decide.
I think W3.org is still working on this issue, but it isn't implemented in any browser yet. Also remember that Internet Explorer will be the last browser to implement it ;)
This is code copied from a W3 Working Draft:
/* If a user wanted to have new windows open in new tabs instead, she could use the following user style sheet to do so: */
* { target-new: tab ! important }
Of course, it is impossible to set user preference in HTML or Javascript -- it would be unsafe.