Closed Bug 445542 Opened 16 years ago Closed 16 years ago

javascript; window.open; location=no; the location is visible at the top of the window

Categories

(Firefox :: Toolbars and Customization, defect)

PowerPC
macOS
defect
Not set
major

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mac.coder, Unassigned)

References

Details

(Keywords: testcase)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9) Gecko/2008061004 Firefox/3.0

the following should open a second window without a locationbar 
however with firefox3, the location is visible and editable

<html>
<head>

<script language="javascript">
function openwindow()
{
  var myWin=window.open("http://www.mozilla.com", "mozilla", "location=no,status=yes");
  if (myWin) myWin.focus();
}
</script>

</head>

<body onload="openwindow();">
</body>

</html>


Reproducible: Always

Steps to Reproduce:
1. open the following in an html file

2.
<html>
<head>

<script language="javascript">
function openwindow()
{
  var myWin=window.open("http://www.mozilla.com", "mozilla", "location=no,status=yes");
  if (myWin) myWin.focus();
}
</script>

</head>

<body onload="openwindow();">
</body>

</html>

3.
Actual Results:  
a new window is opened, but the location is at the top of the window and editable

Expected Results:  
a new window should open without a locationbar

the ability to open a browser window without a locationbar, is very necessary when the window is being used for something like a terminal emulator.
(where tabbing to fields is common, hitting enter executes a command within the window.  however if the current field is the locationbar the application is reloaded, this would destroy the terminal emulation session in this case)
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.1a1pre) Gecko/2008071609 Minefield/3.1a1pre

Works fine for me.  I get a window with a mini-location bar, but the location bar isn't editable and doesn't respond to pressing Enter.  This is what I expect based on the fix for bug 337344.  I wonder why you're seeing something different.  Btw, I had to change 'onload' to 'onclick' to make your testcase work.

If it's important for your terminal emulator that Tab skips the location bar, I'm sure you can find a way to do that using an onkeypress or onkeydown handler ;)
Keywords: testcase
I think the fix here would be to have a disabled state for the location bar when the location bar is supposed to be hidden.
As I said in comment 1, that's what it does for me...
While the location is selectable it does not appear to be editable, so this was a mistake on my part.

The onload works fine for me, and keeps the user from haveing to do an extra click to get going.

The real issue is that the location shows up at all, while in previous versions the location=no would produce no locationbar.
Well, see bug 337344 for why we made the change.
Blocks: 337344
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
Summary: javascript; window.open; location=no; the location is visible and editable at the top of the window → javascript; window.open; location=no; the location is visible at the top of the window
You need to log in before you can comment on or make changes to this bug.