开发者

Chrome & PopUp window names

开发者 https://www.devze.com 2023-04-08 13:29 出处:网络
I am opening pop up windows from a website (flash content) the following way: RING = window.open(path,\'RING_Projekt\',\'width=800,height=600,scrollbars=no,top=\' + t + \',left=\' + l +\'\');

I am opening pop up windows from a website (flash content) the following way:

RING = window.open(path,'RING_Projekt','width=800,height=600,scrollbars=no,top=' + t + ',left=' + l +'');

The HTML file opened in the popup is valid HTML with a <title>, yet Chrome (all other browsers do work fine) will display "Untitled" in the title bar.

Does anyone know why this is happening and if there is an error / workaround that could fix this? Or is this some kind of a pop up blocker malfunction / bug?

Th开发者_Go百科anks!

EDIT: Playing around, I noticed the following (unfortunately it ADDS to my confusion...): the page with the flash content opens another popup (displaying news) on load by doing:

var NEWS = window.open('popup/news.htm','RING_news','width=400,height=400,scrollbars=no,top=20, left=20');

When I now open a popup with the function mentioned in the above post, then go and close the news-Popup opened on load and then switch back to the "on-click"-Popup the popup magically acquired a name. When you close this and open it again, the name is gone again. To be honest: I don't get it. I should be able to have more than one pop-up, right? Also, I cannot see any naming problems or anything else that could explain this behavior.

Am I missing something big here? Or is this a plain bug?


Ok, I am a 99.99% sure this is a Chrome bug, so I'll answer this myself.

Chrome seems to read the specified title correctly from the HTML (as it will be displayed in the task bar), but seems to have problems when having to display the name in the bar on the popup (see screenshot below). When you start to fiddle with the popup (move / resize), the title will sometimes appear and disappear again. Yet, the names in the task bar will always be right (that plus the fact that it works in every other browser lets me think it is a bug).

I am running Chrome 14.0.835.186 m on Windows Vista.

Chrome & PopUp window names


http://code.google.com/p/chromium/issues/detail?id=113201

its a open bug


This is a bug with Chrome. However, there is a workaround for this.

If you put the following script in the page that opens in the popup window, it seems to work fine.

<script language"text/javascript">this.window.resizeBy(1,1);this.window.resizeBy(-1,-1);</script>


The second argument to window.open isn't the <title> of the new window, used by <a target="...">, for example.. The title is determined by the content of the page.

See MDN docs for more info.

0

精彩评论

暂无评论...
验证码 换一张
取 消