window.close() is not working in FF - javascript

We are using window.close() to close the current browser tab. It works for IE, Chrome, Safari, but not for FF.
We tried lot of solutions provided on Internet, but it seems they are not working.
window.open('','_parent','');
window.close();

Actually due to security reason and user experience aspects you can
now can't cause the browser to be closed[Completely], only popup
windows can be closed or the one parent to a script.
check the following mozilla support forum
possible duplicate of SO Question

Related

Force open EDGE over Internet Explorer?

If you try to open stackoverflow website using Internet Explorer, somehow it closes the tab and opens microsoft edge + browse to stackoverflow website?!
How does stackoverflow accomplish this?
StackOverflow
This should open a tab in Edge, but I'm unsure if it'll prioritize Edge over IE.
From what I remember as well, there should be a way to check in JavaScript if the user is using a Windows-related device, and you can then add the 'microsoft-edge:' portion to the href.

Focus method from window object doesn't work in IE(2020)

MDN says that window.focus() is compatible with IE https://developer.mozilla.org/en-US/docs/Web/API/Window/focus.
But if I open IE and write
x=window.open('https://blank.org')
And after I come back to the main tab and I do x.focus() is not working.
I found several similar posts, but they are all old, and the information referred to there is out of date.
Is this happening by default, or is a IE setting?
I can reproduce the issue in IE 11. I searched docs and find that it might be due to some security issues the method can't be used in IE 8+. You can refer to this article:
Windows Internet Explorer 8 and later. The focus method no longer brings child windows (such as those created with the open method) to the foreground.
It can work in modern browsers because they have different engines than IE so the function can work.

window.focus() does not work for existing tabs in ALL IOS browsers

I'm trying to create a "re-launch" button that should bring the user to an existing opened tab. So far, this is how it's implemented:
Using window.open() initially to create the tab and focusing to that tab using window.focus().
The relaunch button should basically call window.focus() and redirect to that tab.
This has been asked in $window.focus() doesn't work on existing tabs in iOS Safari but I'd like to get a more general overview on this question. I've looked everywhere but I couldn't find any lead to this question.
Apparently, it works in android browsers but I can't get it to work in ios browsers (safari, chrome). Does anyone have any clue about this issue?
This seems to be a bug in iOS browsers. As a workaround you may replace
focus() by a sequence of close() and open(...).

The IE doesn't show address bar for popup

I am on the parent page from which I use javascript in jsp, to open a popup and I used the method window.open("url","windowName"," width,height,locastionx, locationy") to get a popup. Everything works fine in all browsers(like Mozilla, Chrome etc) except that the Popup doesn't show the url or address bar in Internet Explorer 10.
I am attaching the screenshots for reference
The following screenshot is a popup from IE
The following is a screenshot of popup from Mozilla
Is there a way in which the window.open method which will show address bar in the IE?
Thanks for helping
I did read in few online blogs that the behaviour of the popup is different with the IE7 or above than in the Mozilla or the Chrome browsers.
I've been busting my head around this problem a couple of days, I've browsed a lot of sites to find the answer, finally I discovered that IE when you run your code in a local environment it hides the URL bar, but when I run it in a Test/Prod server the address is shown (not showing the URL address is clearly a security flaw), this just happens only in IE, which is annoying, for FireFox and Chrome work as intended, and it's kind of a headache if you need to test because it may seem like an error or bug.
Here are the links that should make the things clearer:
Complete cross-browser window.open() documentation -> here
MSDN open method notes ->
here
Server Fault question about IE trust policies related to the URL bar -> here

SlideShare Does not Load on Internet Explorer 8

I have made a simple embed of slideshare on my site. However, on Internet Explorer, it keeps saying "Loading" and nothing appears. However, in Firefox its almost instant. Please try here using internet explorer.
Or is it just me? It makes use of Flash and Javascript.
What can the problem be?
Thanks all for any hellp
This page works fine in IE9 at least, and the content you say is broken was written in Flash. You might want to watch your HTTP traffic using Fiddler (www.fiddler2.com) and check for script errors using IE's developer tools (hit F12).
I've check it in Chrome, Firefox, IE6/7/8 and they all seem fine. I haven't checked it in Opera or Safari though.

Categories