This seems like a strange change of functionality with Firefox 4. After opening a window using window.open () when clicking links in the window that opens using the middle mouse button (or right-clicking and selecting “open in a new window” tab), it opens Links in a new tab in the old window .
In Firefox 3, the tab would open in a new window.
Sample code, index.html:
<html>
<head>
<script type="text/javascript">
function foo() {
var w = window.open('page2.html', 'foobar', 'target=_blank');
}
</script>
</head>
<body>
<a href="#" onclick="foo()">bar</a>
</body>
</html>
page2.html:
<html>
<head />
<body>
<a href="www.google.com">google</a>
</body>
</html>
After opening page2 from index.html and right-clicking on the google link in the window containing index.html, a new tab will appear.
Does anyone know how to fix this?
EDIT: Chrome does the same.
source
share