Closed Bug 1636229 Opened 5 years ago Closed 5 years ago

Popup javascript window is now tabbed (v76 32 bit)

Categories

(Firefox :: Theme, defect, P1)

x86
Windows 7
defect

Tracking

()

RESOLVED FIXED
Firefox 78
Tracking Status
firefox-esr68 --- wontfix
firefox75 --- wontfix
firefox76 --- wontfix
firefox77 --- wontfix
firefox78 --- fixed

People

(Reporter: antagony1060, Assigned: arai)

References

(Regression)

Details

(Keywords: regression)

Attachments

(5 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

Create a bookmarklet with the following javascript in the location field:

javascript:%20var%20WindowPopup%20=%20window.open(window.location.href,'PopUp'+Date.now(),'left=1260,top=590,width=550,height=570,scrollbars=yes,status=no');

Actual results:

The popup window it creates now shows the full tab bar and it isn't even merged into the title bar like in the normal window, so it's taking up twice as much space.

Expected results:

The popup window should not be tabbed, like in previous versions. It still works as desired in the v76 64 bit, which I have on another machine.

Just to confirm, this issue is reported against Firefox 76.0, and you observe both expected and unexpected behavior with the same version, on 2 different machines, right?

For me, it's not reproducible with Firefox 76.0 with clean profile on Windows 10.
I wonder if some preferences or extension is interfering.

To figure out where the cause is, can you test the following and report back what happened?

  1. run in safe mode [1], and open the bookmarklet
    * A) if the issue disappears, it would be some extension
    * B) if the issue persists, it may be some preferences
  2. create another testing profile, and create the bookmarklet, and open the bookmarklet
    * C) if the issue disappears, it would be some preferences
    * D) if the issue persists, it may be some external thing

If you observed A, can you try disabling all extensions in non-safe mode, and enable one by one to see which one is causing?

If you observed B and/or C, can you tell me the value of the following preferences in about:config?

  • browser.link.open_newwindow
  • browser.link.open_newwindow.restriction
  • browser.link.open_newwindow.disabled_in_fullscreen

[1] https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode

Flags: needinfo?(antagony1060)
Regressed by: 1507375

(In reply to Tooru Fujisawa [:arai] from comment #1)

Just to confirm, this issue is reported against Firefox 76.0, and you observe both expected and unexpected behavior with the same version, on 2 different machines, right?

Yes, although the machine with the expected behaviour is 64 bit, whereas the machine with the unexpected behaviour is 32 bit.

To figure out where the cause is, can you test the following and report back what happened?

Running in safe mode had no effect, but the issue did disappear (C) when running in a clean profile.

If you observed B and/or C, can you tell me the value of the following preferences in about:config?

  • browser.link.open_newwindow
  • browser.link.open_newwindow.restriction
  • browser.link.open_newwindow.disabled_in_fullscreen

The values are 3, 2, and false, respectively. However, I checked them in the clean profile and they're exactly the same. So I guess there must be a settings issue, but maybe somewhere else? I do have toolkit.legacyUserProfileCustomizations.stylesheets set to true so I can manually set the favicons for some bookmark folders in userchrome.css, but I've set that the same in the clean profile and it didn't cause it to behave unexpectedly.

Flags: needinfo?(antagony1060)

Thank you for checking.

(In reply to antagony1060 from comment #2)

(In reply to Tooru Fujisawa [:arai] from comment #1)

Just to confirm, this issue is reported against Firefox 76.0, and you observe both expected and unexpected behavior with the same version, on 2 different machines, right?

Yes, although the machine with the expected behaviour is 64 bit, whereas the machine with the unexpected behaviour is 32 bit.

It happens on Windows 10, 32 bit, right?

To figure out where the cause is, can you test the following and report back what happened?

Running in safe mode had no effect, but the issue did disappear (C) when running in a clean profile.

If you observed B and/or C, can you tell me the value of the following preferences in about:config?

  • browser.link.open_newwindow
  • browser.link.open_newwindow.restriction
  • browser.link.open_newwindow.disabled_in_fullscreen

The values are 3, 2, and false, respectively. However, I checked them in the clean profile and they're exactly the same. So I guess there must be a settings issue, but maybe somewhere else? I do have toolkit.legacyUserProfileCustomizations.stylesheets set to true so I can manually set the favicons for some bookmark folders in userchrome.css, but I've set that the same in the clean profile and it didn't cause it to behave unexpectedly.

Can you open about:support page, and click "Copy raw data to clipboard" button, and paste the result to text file, and attach it here?
the data contains "Important Modified Preferences" section that can give us hint.

Flags: needinfo?(antagony1060)

(In reply to Tooru Fujisawa [:arai] from comment #3)

Thank you for checking.

(In reply to antagony1060 from comment #2)

(In reply to Tooru Fujisawa [:arai] from comment #1)

Just to confirm, this issue is reported against Firefox 76.0, and you observe both expected and unexpected behavior with the same version, on 2 different machines, right?

Yes, although the machine with the expected behaviour is 64 bit, whereas the machine with the unexpected behaviour is 32 bit.

It happens on Windows 10, 32 bit, right?

No, it's actually a Windows 7, 32 bit machine – which I couldn't upgrade to W10 for various reasons. I realize it's no longer a supported OS, but the fact it was fine before FF76 and it's fine in a clean profile suggests the problem is with the application rather than the OS, no?

Can you open about:support page, and click "Copy raw data to clipboard" button, and paste the result to text file, and attach it here?
the data contains "Important Modified Preferences" section that can give us hint.

Will do…

Flags: needinfo?(antagony1060)
Component: Untriaged → DOM: Core & HTML
OS: Unspecified → Windows 7
Product: Firefox → Core
Hardware: Unspecified → x86
Attached file raw-std_profile.txt

I've stripped out all of the irrelevant hardware sections, so it just contains the modifiedPreferences and lockedPreferences section.

Would you like the raw text from the clean profile too, for comparison?

Thanks.
I've tried with clean profile + the settings in the text, but still not reproducible.
and also I don't find anything suspicious in the list.
I wonder if there's some other things related (maybe other settings not shown there, or maybe UI customization, or something else...)

Can you provide the following information?

(In reply to antagony1060 from comment #6)

Would you like the raw text from the clean profile too, for comparison?

No

Flags: needinfo?(antagony1060)

Also, if you have time, can you try the following?

  1. open Firefox with main profile (the profile that the issue happens), let's call it profile A
  2. open about:support , in "Application Basics" section, "Profile Folder" row, click "Open Folder"
  3. close the Firefox
  4. open Firefox with newly created clean profile, let's call it profile B
  5. open about:support , in "Application Basics" section, "Profile Folder" row, click "Open Folder"
  6. close the Firefox
  7. copy prefs.js in profile A folder, and paste (replace) it into profile B folder
    * so that, the profile B has the setting in the profile A, and nothing else from it
  8. run Firefox with the profile B
  9. test the bookmarklet

if the issue happens there, it's something inside prefs.js (so, something not shown in the text file above)
if the issue doesn't happen there, it's something else in the main profile.

Attached image tabbed-popup.png

Thank you for continuing to help me with this, Tooru Fujisawa. It is much appreciated.

(In reply to Tooru Fujisawa [:arai] from comment #7)

Can you provide the following information?

  • where is the bookmarklet placed, and how do you open it?
    It's just a button on the bookmark bar.

I use it for many purposes and it works with almost any URL. And yes, it does reproduce with this page.

  • can you post a screenshot of the window opened by the bookmarklet?

(In reply to Tooru Fujisawa [:arai] from comment #8)

Also, if you have time, can you try the following?

I will try that shortly.

Flags: needinfo?(antagony1060)
Attached image untabbed-popup.png

(In reply to Tooru Fujisawa [:arai] from comment #8)

Also, if you have time, can you try the following?

9. test the bookmarklet

if the issue happens there, it's something inside prefs.js (so, something not shown in the text file above)
if the issue doesn't happen there, it's something else in the main profile.

As the new attached image shows, it doesn't happen there.

Thank you again.
according to the screenshot, the window is partially popup (it doesn't have navigation buttons etc) but still has tab bar.
that's very unexpected behavior.
at least, it's not allowed for website, so I guess there's something going wrong around detecting what context the window.open is called.

can you post a screenshot of your normal window?
to make sure the difference between the normal window and "popup" window.

Also, can you do the following, to see if the issue persists with cloned profile?

  1. create yet another new profile (call it profile C)
  2. open profile A and profile C folders in explorer (by following about:support buttons)
  3. close all Firefox windows
  4. copy all files in profile A, and paste them in profile C (overwrite if any)
  5. run Firefox with Profile C
  6. test bookmarklet

If the issue happens there, we can now bisect which file is causing, by the following steps:

  1. remove profile C, and create yet another new profile, call it profile D
  2. close all Firefox windows
  3. copy half of the files in profile A, and paste them in profile D (overwrite if any)
  4. run Firefox with Profile D
  5. test bookmarklet
  6. if the issue doesn't happen, next step is to test with another half of the files in the profile
  7. if the issue happens, next step is to test with half of the files used in this run
Flags: needinfo?(antagony1060)

Set release status flags based on info from the regressing bug 1507375

Attached image normal-window.png

(In reply to Tooru Fujisawa [:arai] from comment #11)

Okay, I've attached a screenshot of my normal window, the button on the right marked ‘POP’ is the one with the bookmarklet in it.

Also, can you do the following, to see if the issue persists with cloned profile?

6. test bookmarklet

That seems to have fixed it! So should I just delete my old profile and rename this new cloned profile (C) to the default? Or would you like to investigate it further?

Flags: needinfo?(antagony1060)

Thank you so much.

If the issue doesn't happen with cloned profile, the another possibility is that there's unexpected cache in your cache directory
and it's somehow affecting.

if everything is working properly in the cloned profile, I think it's fine to use that profile as your main profile (you can set it in about:profiles page, "Set as default profile" button).
Just to make sure, the cloned profile contains all bookmarks, histories, logins etc from your main profile?

then, about the investigation, if you can provide the result of the following, that helps us much.

  1. run Firefox with your main (not cloned) profile
  2. open about:profiles
  3. locate the profile that has "This is the profile in use and it cannot be deleted." (likely, "default" named)
  4. click "Open Folder" for "Local Directory" (that directory contains cache files, there will be "cache2", "startupCache", etc directories)
  5. close all Firefox windows
  6. create a new directory in your desktop (or somewhere)
  7. move (backup) all files in the cache directory into the new directory
    * so that there's no cache in the cache directory
  8. run Firefox with your main profile
  9. test the bookmarklet

if the issue doesn't happen on the main profile, it means some cache is affecting.
it would be nice if you can figure out which directory it is, by copying the backed up directory to the original cache directory one by one.

if the issue still happens on the main profile, there's yet another cause (that so far I cannot think of any...).

Flags: needinfo?(antagony1060)

Well I emptied out the cache folder completely from the old profile, but the issue still persists I'm afraid.

As far as I can tell all my old bookmarks, histories, logins, etc., are intact in the new profile, so I'm happy to switch to that. But I'll keep my old profile on the system for now, and if you do think anything else it could be I'll be happy to test it for you.

Thanks again for your patient help.

Flags: needinfo?(antagony1060)

Okay, I've figured out how to replicate this issue on 32 bit machines – well on mine at least – so it will hopefully help you to pinpoint the bug.

But first I need to apologise, as I realized last night that I'd made a mistake when I said the cloned profile had fixed the issue, it hadn't. What happened was: prior to getting a reply here I'd found a workaround via userchrome. I was certain I'd commented out all of that code before creating the clone, but apparently I had not.

Anyway, today I've tried your procedure to isolate the offending file. It proved very difficult because some combinations of files broke the profile altogether when copied in, but I eventually worked out that replacing addons.json in a new profile, opening and closing Firefox, then replacing addonStartup.json.lz4, would trigger the tabbed behaviour every time.

Now, knowing that Firefox will often automatically replace missing files, I tried just removing the addonStartup.json.lz4 file and it kind of worked. However, it had turned all but the current tab solid black. I investigated that and found it was related to themes, so I selected the Light theme and that fixed the tab colour, but the tabbed popup behaviour was back! I then created another new profile, just changed the theme to Light and hey presto: the popups were tabbed.

I hope this helps.

Thank you for the info!

I've tried testing with clean profile + Light theme with Firefox 76.0 64 bit, on Windows 10, but it doesn't reproduce.
I'll prepare 32-bit windows 7 env and test there.

Confirmed the issue on Firefox 76.0.1 32 bit, clean profile + Light theme, on Windows 7 32-bit env.

Assignee: nobody → arai.unmht
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

reproducible also on nightly

Version: 76 Branch → Trunk

Good to hear, thank you! I was concerned it might just be my system.

for me, this happens also on Firefox 75.0 32 bit + clean profile + Light theme, on Windows 7 32-bit env, that's before bug 1507375.
maybe we're seeing different issue? if this started happening from 76, on your env.

No longer regressed by: 1507375

also, toolbar#TabsToolbar's collapsed attribute is set to "true", but there's a style rule that makes it visible, only when using theme,
and apparently it has priority.

https://searchfox.org/mozilla-central/rev/fa52bedc4b401c12251513fa1c9df1753a29abb2/browser/themes/windows/browser.css#275-277

@media (-moz-windows-compositor: 0) {
  /**
   * Anytime we're not using the compositor on Windows, the -moz-window-titlebar
   * and -moz-window-titlebar-maximized values for -moz-appearance override
   * backgrounds supplied by lwthemes. We make the #titlebar itself hidden, but
   * it's children visible in order to hide the background but keep the margin and
   * padding that comes from those -moz-window-titlebar rules.
   */
  :root:not([inDOMFullscreen]) #titlebar:-moz-lwtheme {
    visibility: hidden;
  }
  :root:not([inDOMFullscreen]) #toolbar-menubar:-moz-lwtheme,
  :root:not([inDOMFullscreen]) #TabsToolbar:-moz-lwtheme {
    visibility: visible;
  }
}

this seems to be more old thing.

will continue investigating.

See Also: → 1507375

Can you please test with Firefox 75.0 + Light theme?
https://ftp.mozilla.org/pub/firefox/releases/75.0/

Flags: needinfo?(antagony1060)

Interesting. I'm sure it wasn't occurring for me in any version prior to 76. I use pop-out windows every day without fail, so I definitely would have noticed. I've also used the Light theme ever since Quantum was introduced, so that's not a difference either.

Sorry, but I don't know what to do with that v75 link, it just looks like a directory listing to me. I'm happy to test it for you, but you'll have to walk me through the process first, please.

Flags: needinfo?(antagony1060)

there you can download Firefox 75.0 installer, for each configuration and language.

for example, here's the URL for en-US locale, windows 32 bit.
https://ftp.mozilla.org/pub/firefox/releases/75.0/win32/en-US/

so, if it matches to your locale:

  1. download https://ftp.mozilla.org/pub/firefox/releases/75.0/win32/en-US/Firefox%20Setup%2075.0.exe
  2. run Firefox Setup 75.0.exe
    1. select custom directory to install, say c:/Program Files/Mozilla Firefox 75/, so that it doesn't overwrite your normal Firefox installation
    2. uncheck creating icon and shortcut
    3. let the installer run Firefox, it will create a new profile (because the installed directory is different)
  3. IMPORTANT: Firefox 75 will update to Firefox 76 once you restart, because of automatic update, so please test without restarting
  4. test with bookmarklet with Light theme enabled
  5. once tested, please uninstall Firefox 75

:mconley, can you take a look at comment #22, the stylesheet part of the possible cause?

it looks like you've touched the above code, and looks like it's causing the issue at least on my env,
and the code around there doesn't seems to be modified for a while.
was there anything underlying changed on 76,
or maybe with hotfix (or whatever applied out of bound) or something, that can apply to older versions?
(given the style is applied conditionally on graphics things)

the reproduction steps are following:

  1. Run Firefox 75 / 76 / nightly, with clean profile, on windows 7, 32-bit env
  2. choose Light theme on customization
  3. show bookmark toolbar
  4. create a bookmark with the following URL
    javascript:%20var%20WindowPopup%20=%20window.open(window.location.href,'PopUp'+Date.now(),'left=1260,top=590,width=550,height=570,scrollbars=yes,status=no');
  5. open https://bugzilla.mozilla.org/show_bug.cgi?id=1636229 (or any http(s) website that can be opened in popup)
  6. click the bookmark

the result here is that, the popup has tab bar.
and when I switch to default theme, the tab bar gets hidden. this happens immediately, while the popup is opened.

Flags: needinfo?(mconley)

for me, with the STR in comment #26, this doesn't happen on 64.0.2 or older, and starts happening from 65.0.2

The CSS block that you've highlighted is enabled if not using the Windows compositor (on Windows 7, the compositor is what powers the "glass" aero effect).

I'm not sure what might have suddenly introduced this. If you're able to reliably reproduce this, could you use mozregression to find the regressor?

Flags: needinfo?(mconley)

here's regression range for me.
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=04b755bbff848f7e245ae86c3fa2c5d6c6bad191&tochange=6e842238034cd847ede178b4e65ea07704e4ffe6
that contains bug 1356920

then, I'm running this on VM, that glass aero effect isn't running.

Flags: needinfo?(mconley)
See Also: → 1356920

Yes, almost certainly the regressor is bug 1356920 then.

We might need additional conditions within that block if chromehidden~="toolbar", like here: https://searchfox.org/mozilla-central/rev/fa52bedc4b401c12251513fa1c9df1753a29abb2/browser/base/content/browser.css#55

Flags: needinfo?(mconley)
Keywords: regression
Regressed by: 1356920
Has Regression Range: --- → yes
Component: DOM: Core & HTML → Theme
Product: Core → Firefox

I'll create a build with the fix applied, and ask the reporter to test with it to see if it solves the issue there as well.

(In reply to Tooru Fujisawa [:arai] from comment #23)

Can you please test with Firefox 75.0 + Light theme?
https://ftp.mozilla.org/pub/firefox/releases/75.0/

I installed v75 and the popup was tabbed after changing the theme to Light. I've even tried restoring a pre-v76 backup of my main profile to test that against v75, but it was still showing the same behaviour.

However, as I said before, I use the popout window daily and it definitely wasn't doing it before. But even if it was and I somehow hadn't noticed, there is absolutely no way it's been doing it since v65. It was only a short while ago – 3-4 weeks maybe – that I'd resized the window slightly, so I would certainly have noticed if it then.

(In reply to antagony1060 from comment #32)

(In reply to Tooru Fujisawa [:arai] from comment #23)

Can you please test with Firefox 75.0 + Light theme?
https://ftp.mozilla.org/pub/firefox/releases/75.0/

I installed v75 and the popup was tabbed after changing the theme to Light. I've even tried restoring a pre-v76 backup of my main profile to test that against v75, but it was still showing the same behaviour.

However, as I said before, I use the popout window daily and it definitely wasn't doing it before. But even if it was and I somehow hadn't noticed, there is absolutely no way it's been doing it since v65. It was only a short while ago – 3-4 weeks maybe – that I'd resized the window slightly, so I would certainly have noticed if it then.

have you changed the system setting about the windows theme recently?
the issue we've found so far happens only on windows 7, when not using glass effect.

No, and I meant to mention that I don't use an Aero theme either, as they cause issues with drag and drop behaviour in some legacy software I have to use for work.

I've just tried an Aero theme and can confirm it din't show the tab.

Can you test the following 2 things?

  1. Download https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/HnLQqkmVS62T4lqyoCIBIg/runs/0/artifacts/public/build/target.zip
    this is equivalent to Nightly build + a possible fix for this issue
  2. Extract the downloaded target.zip into some directory
    NOTE: Please extract the file, instead of just opening the zip file as directory (that's Windows' feature)
  3. run firefox.exe in the extracted directory
    this will create yet another profile for it
  4. switch to "Light" theme
  5. create the bookmarklet, and test it

If the popup doesn't have tab bar, the one of the issue here is solved by the patch.
(still there's question why this started happening for you from 76 tho)

In that case, please test the following as well:

  1. run firefox.exe in the above directory, in case if you closed it
  2. open about:profiles, and open the "Root Directory" and "Local Directory" for the current profile (the one that has "This is the profile in use and it cannot be deleted." label)
  3. close all firefox windows
  4. copy the content from your main profile, into above directories
    (the same thing as what you've done with cloned profile test, first time)
  5. run firefox.exe in the above directory
  6. test the bookmarklet

If the popup doesn't have tab bar, this patch is effective for the original case as well,
so we'll going to merge it.

Flags: needinfo?(antagony1060)

All done and the tab bar didn't display in the popup after changing the theme. Great job and thank you again!

I'll keep using my userchrome.css workaround until the fixed version is released. Can you say when that is likely to be?

Flags: needinfo?(antagony1060)

Thank you!
I cannot say the exact time, but I'll try to fix within 2 weeks, hopefully uplift the patch to beta and release.

Because this bug's Severity is normal and has not been changed, and this bug's priority is -- (none,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Severity: normal → --
Severity: -- → S2
Priority: -- → P1
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/5fe3274eb6b6 Do not force-show menubar/tabs in popup. r=dao
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78

Comment on attachment 9147650 [details]
Bug 1636229 - Do not force-show menubar/tabs in popup. r?dao!

Beta/Release Uplift Approval Request

  • User impact if declined: on Windows 7 without Aero glass environment, with lightweight theme enabled,
    An popup opened by website has tab bar unexpectedly, that causes confusion and usability problem.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This was caused by an workaround for the above specific environment, that's enabled for unnecessarily large cases,
    this patch reduces the effect of it so that it doesn't affect unnecessary case.
  • String changes made/needed:
Attachment #9147650 - Flags: approval-mozilla-beta?

Comment on attachment 9147650 [details]
Bug 1636229 - Do not force-show menubar/tabs in popup. r?dao!

It regressed in 65, just landed in Nightly and we are in our last week of betas, that seems too risky for our last uplifts, I think it should ride the 78 train, sorry.

Attachment #9147650 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: