Closed Bug 215404 Opened 19 years ago Closed 10 years ago

New windows from bookmarks opens behind current window, when using javascript

Categories

(SeaMonkey :: Bookmarks & History, defect)

x86
Windows ME
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: segfault, Unassigned)

Details

(Whiteboard: [2012 Fall Equinox])

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)
Build Identifier: 

javascript:void(bookwin=window.open('http://mozilla.org',
'shorl','width=580,height=300,scrollbars=yes,toolbar=no,location=no'));
	

When I bookmark this and click on the bookmark the window opens but no focused, 
this is not the way it should be.



Reproducible: Always

Steps to Reproduce:
1. create bookmark with javascript open window code in it
2. click bookmark

Actual Results:  
3. see it open unfocused


Expected Results:  
Open it infront

This is not the case on IE6/5/5.5

I also think that these windows should be focused when they already exist. e.g. 
if I use this bookmark and then let the it be in the background it should 
refocus on the top instead of loading the page in the background. This is not 
the case in IE.

I think this can be worked around with javascript.

This is a sane default setting
I'm seeing this on MacOS with 1.4.1, 1.5 and 1.6b.

Is there a reason for this behavior?  Anyone know a javascript workaround?
Status: UNCONFIRMED → NEW
Ever confirmed: true
adding bookwin.focus() didn't work, too.
workaround may be:

javascript:url='http://mozilla.org';void(bookwin=window.open('','shorl','width=580,height=300,scrollbars=yes,toolbar=no,location=no'));bookwin.document.write('<head><meta
http-equiv="Refresh" content="1; url=\''+url+'\'" /></head><body
onLoad="window.focus()"><a
href="'+url+'">klick</a></body>');bookwin.document.close();
No; that doesn't work either.  I remember at least one other bug on this topic;
I don't know why it hasn't been fixed yet.  Of course, I don't know how to fix
it(yet).
Product: Browser → Seamonkey
Reassigning as per Bug #32644
Assignee: p_ch → nobody
WMF with original code, newly created window get focus
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/18.0 Firefox/18.0 SeaMonkey/2.15a1
Build identifier: 20120921003032
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
Whiteboard: [2012 Fall Equinox]
You need to log in before you can comment on or make changes to this bug.