Closed Bug 213944 Opened 21 years ago Closed 19 years ago

opener window gets restored (unmaximized) on focus by the new window

Categories

(SeaMonkey :: UI Design, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED EXPIRED

People

(Reporter: dinocherian, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624


Save and Run the script given below. Then click on the link, so that a window
pops up. I have coded to bring the opener window to front if it is minimized or
is not visible, when the new poped-up window is closed.

When we close the new window, while the main window (opener) is in maximized
state, there is no problem. but if the opener is minimized, it is unminimized
but the new state is 'restored' and not 'maximized'. 

I agree that it is not making any annoyance but fixing it will make mozilla more
 professional. :)

------------------------ cut -----------------------
<html>
<head>
<script language=javascript>
function topLevelWindow()
{
    var w;
    for(w = window; w.parent != w; w = w.parent);
    return w;
}

var popUpWin = 0;
function popUpWindow(sURL, nWidth, nHeight, nLeft, nTop)
{
    if("undefined" == typeof nLeft)
        nLeft = (screen.width - nWidth) / 2;
    if('undefined' == typeof nTop)
        nTop = (screen.height - nHeight) / 2;
    
    if(popUpWin)
        if(!popUpWin.closed) popUpWin.close();
    
    popUpWin = open(sURL, 'popUpWin', 
'toolbar=yes,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width='+
nWidth+',height='+nHeight+',left='+nLeft+',
top='+nTop+',screenX='+nLeft+',screenY='+nTop);
    popUpWin.opener = topLevelWindow();
    popUpWin.document.open();
    popUpWin.document.write('<html><head></head><body
onUnload="window.opener.focus()"></body></html>');
    popUpWin.document.close();
}
</script>
</head>
<body>
<a href="javascript:popUpWindow('', 400, 300)">click here</a><br>
</body>
</html>

------------------------ cut -----------------------


Reproducible: Always

Steps to Reproduce:
1. Save and Run the script given earlier in the 'Details' entry.
2. Maximize the window.
3. Then click on the link that apears on the page, so that a window pops up.
4. Now minimize the main window (opener).
5. Close the new poped-up window.

Actual Results:  
The opener poped up but got 'restored'. 

Expected Results:  
The opener window should come back to the previous state, i.e., to the maximized
state.
Not a JavaScript Engine issue. Not sure of correct component;
reassigning to XP Apps:GUI Features for further triage -
Assignee: rogerl → blakeross
Component: JavaScript Engine → XP Apps: GUI Features
QA Contact: pschwartau → paw
Summary: opener window gets restored on focus by the new window → opener window gets restored (unmaximized) on focus by the new window
Reassigning obsolete bugs to their respective Seamonkey owners (i.e. nobody). 
If you want this fixed for Firefox, change the Product and Component accordingly
and reassign back to me.
Assignee: firefox → guifeatures
Product: Core → Mozilla Application Suite
Another way to reproduce this is to maximize the browser, then minimize it, then
double-click on an Internet Shortcut on the desktop.

Given that it has been over a year since Blake Ross asked for initiative from
the bug poster to alter the bug to specify it for Firefox if wanted fixed, and
nothing has happened, can either someone please follow through on this, or
should we create a separate bug report Firefox?

This is annoying behavior, and is still present in the latest Firefox trunk
nightlies.
This bug also applies, more importantly, to Firefox.  Create a bug report for
Firefox?
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
This is still present.  Maximize a window, then minimize it.  Finally, open an external link that opens into a new tab.  Window pops back up in the un-maximized state.  

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20051027 Firefox/1.6a1.  
Should a new bug be created that is firefox-specific?  This is still present in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060505 BonEcho/2.0a1.
Looks like this has been fixed without intervention into this bug report.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b2pre) Gecko/2007112505 Firefox/3.0a6pre ID:2007112505 or earlier.
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.