为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Titlebar is blank for popup window.

more options

Hi, My application opens a popup window through JavaScript method window.open(), then I set the document title using JavaScript. I can see the title bar appears as blank in Firefox 12 in Windows 7 machine. I have to set menubar property to 'yes' and toolbar property to 'no' in the ‘window.open’ method as this is the requirement. This works fine in windows XP machine with a higher version of Firefox. Please suggest any solution for this or please confirm if this was a bug with Firefox 12 and fixed in latter version.

Regards Anup

Hi, My application opens a popup window through JavaScript method window.open(), then I set the document title using JavaScript. I can see the title bar appears as blank in Firefox 12 in Windows 7 machine. I have to set menubar property to 'yes' and toolbar property to 'no' in the ‘window.open’ method as this is the requirement. This works fine in windows XP machine with a higher version of Firefox. Please suggest any solution for this or please confirm if this was a bug with Firefox 12 and fixed in latter version. Regards Anup

所有回复 (11)

more options

Can you replicate the problem in Firefox 14 on Windows 7?

Hundreds of bugs were fixed since Firefox 12:

https://www.mozilla.org/en-US/firefox/13.0/releasenotes/buglist.html

https://www.mozilla.org/en-US/firefox/14.0.1/releasenotes/buglist.html

more options

Hi, I just tested it in Firefox 12,14,15 in Windows 7 machines and the issue is still there but surprisingly Firefox 12,13,14 in Windows XP machine shows title properly.

由anupmahato于修改

more options

Can you provide a link to a page demonstrating the problem? I think that might be helpful in tracking down the issue.

more options

This application is running in intranet now, so it's not accessible from outside. Although you may replicate the issue in Firefox 12,13,14,15 in Windows 7 machine using the following HTML:

<html>
 <head><title>Parent Page</title>
 <script language="JavaScript">
  function openPopup(){
   var popupScr = window.open("#","_blank","resizable=yes,menubar=yes,toolbar=no");
   popupScr.document.title="Test doc title";

  } 
 </script>
 </head>
 <body>
  <input type="button" onclick="openPopup();" value="Click to open popup"/>
  
 </body>
 
</html>

由cor-el于修改

more options

Thanks, that's very helpful. There seems to be some kind of timing issue; although my eye isn't fast enough to be sure, it appears the title might be changing and then changing back. Possibly related to navigating to the hash location in the document??

You could see whether this approach works for your application:


<!DOCTYPE html> <html> <head> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <title>Parent Page</title> <script type="text/javascript"> function openPopup(){ var popupScr = window.open("#","_blank","resizable=yes,menubar=yes,toolbar=no"); popupScr.onload=function(){popupScr.document.title="Test doc title"}; } </script> </head> <body> <button onclick="openPopup();">Click to open popup</button> </body> </html>
more options

I have tried fixing the issue with similar code before with no luck. I ran you code as is and am still facing the same issue.

more options

Hmmm, it worked for me. Do you get any script errors in the console (Ctrl+Shift+j)?

If you check about:config, have you customized any window.open permissions? To check that:

(1) In a new tab, type or paste about:config in the address bar and press Enter. Click the button promising to be careful.

(2) In the filter box, type or paste window_open and pause while the list is filtered.

Non-default values will appear in bold.


Oh, wait a second. I have configured Firefox to display the classic menu bar instead of the new orange Firefox button. If you have the orange Firefox button, then the window title only appears on the page's tab and in that pop-up window, there is no tab.

more options

That's correct. The orrange button apears in my case. I hope this is the default setting. Biz won't agree to configure each client machine, so I'll have to consider the default setting only. How can I show a tab in the popup page when toolbar is kept disabled? This works fine in IE. Why is title not shown when menubar is enabled? Attached a screenshot for your ref...

more options

When you have the classic Menu Bar enabled, the page title appears in the Windows title bar just like in the old days. No problem there. However, the default is indeed the orange Firefox button.

It seems the tabs only appear if you enable toolbars. Hmmm...

https://developer.mozilla.org/en/DOM/window.open#Toolbar_and_chrome_features

more options

Thanks a lot for helping me in finding out the exact reason behind this behavior of FF. Shouldn't this be considered as a bug as browsers are always supposed to show title of the page being displayed?

more options

For websites, you can display whatever information you want to the display in the page itself, so there isn't a particularly compelling argument that you need the title/tab bar. However, it's probably worth filing a bug (or searching to see whether one has been filed) from the user's perspective: maybe it should be impossible for sites to disable the tab bar or possible for users to get the title in the window title bar when there is no tab bar?