Closed Bug 212248 Opened 23 years ago Closed 22 years ago

In Mac, the child window shifts to the background even though the "alwaysRaised" property is given.

Categories

(SeaMonkey :: UI Design, defect)

PowerPC
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: amrit, Assigned: jag+mozilla)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Build Identifier: http://ftp.mozilla.org/pub/mozilla/releases/mozilla1.4/mozilla-mac-MachO-1.4.dmg.gz Here's the simple example files: testapp.xul ------------------------------------------------------------------------ <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="testapp" title="Test Client" onload="onLoad()" width="500" height="500" centerscreen="yes" dependent="yes" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> <script> var newWindow = null; var iCtr = 0 ; function openDialogWindow() { // Just to check whether window has been closed or not try { if (newWindow.document.getElementById("someDescId").firstChild.data) ; } catch( ex ) { newWindow = null; } // If window is open if (newWindow) { newWindow.document.title = "Changed Title" + iCtr; iCtr++; } // If new window needs to be opened else { newWindow = window.openDialog( "chrome://testapp/content/blank.xul", "New Window Bug", "chrome,resizable=no,centerscreen,alwaysRaised,dependent=yes"); iCtr = 0 ; } } </script> <button label="Click Here to open a Window" onclick="openDialogWindow()" /> </window> blank.xul --------------------------------------------------------------- <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="popup" title="Bug" dependent="yes" resizable="no" alwaysRaised="yes" screenX="200" screenY="200" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml"> <description id="someDescId">Bug Report: Regarding window.open in Macintosh</description> <description> Action: click on the button in the main window. A new pop-up window opens up. click on the button again. </description> <description> Result: Pop-up window shifts to the background after the second click. "alwaysRaised" attribute does not seem to work. </description> <description> Action: close the main window. since dependent attribute was used, child window should also close along with the parent window. </description> <description> Result: Child window stays even after the parent is closed. "Dependent" attribute also does not seem to work.</description> <description>This behaviour is only prevalent in Mac</description> <description>It works fine in Linux and Windows</description> </window> Reproducible: Always Steps to Reproduce: 1.Open the main application file : testapp.xul 2.This has a button link with a label "Click Here to open a Window". Click it. 3.This should open a popup window. 4.Click on the link again without closing the previous popup. 5.In Mac, the window shifts to the background even though "alwaysRaised" property is given. 6.When you close the parent window, the child remains inspite of giving "dependent=yes". Actual Results: Result 1: Pop-up window shifts to the background after the second click. "alwaysRaised" attribute does not seem to work. Result 2: Child window stays even after the parent is closed. "Dependent" attribute also does not seem to work. Expected Results: Result 1: Pop-up window should not shift to the background after the second click. This works in Linux/Windows environment. Result 2: Child window should close with the parent.
not a blocker for development
Severity: blocker → major
Mozilla King, what exactly sends the alwaysRaised window behind another window? Is it merely clicking in the opener? Clicking in any window? Is it specifically clicking the button you mentioned? I'm guessing it's #2, clicking in any window. Most likely, what you're seeing is that content script isn't allowed to open an alwaysRaised window. Not mentioned is whether this testcase was running with chrome privileges. I'm guessing not. In that case, alwaysRaised simply fails silently as do all the other privileged features, like titlebar=no or modal=yes. Sorry. alwaysRaised from untrusted content would make the world of unsolicited popup windows just so much nastier. We could arguably stand to mention window.open feature failures in the JS console window. That could be another bug. This bug I'm closing invalid. Please do reopen it if I've misinterpreted its intent. Oh, another bug was mentioned as well. Dependent windows don't work on the Mac. Sad, but true. That's bug 76591.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Product: Core → Mozilla Application Suite
You need to log in before you can comment on or make changes to this bug.