Closed Bug 1729212 Opened 3 years ago Closed 3 years ago

popup image minimized

Categories

(Core :: Layout: Images, Video, and HTML Frames, defect)

Firefox 91
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: steve.patco, Unassigned)

Details

Attachments

(2 files)

Attached file jscript_main.php

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

When clicking on my thumbnail image on my ecommerce product.

Actual results:

Popup window opens with image minimized with scroll bars

Expected results:

Popup window should open full image with no scroll bars.

Speculation js noreferrer in attached file.

Not a problem with Chrome and Edge.

The Bugbug bot thinks this bug should belong to the 'Core::ImageLib' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → ImageLib
Product: Firefox → Core

Can you provide a simple testcase that reproduces or a link to one?

Component: ImageLib → Layout: Images, Video, and HTML Frames
Flags: needinfo?(steve.patco)

The attached php just has code to open a popup window but no url for the contents of the popup, the page opened in the popup seems likely to play a part.

for example https://processserverseminar . com/florida-counties-c-2/alachua-county-process-server-seminar-p-5.html

Flags: needinfo?(steve.patco)

10 years ago, someone reported this problem on a different forum. This was the response in that forum.

"This is most likely caused by having FireBug installed on FireFox ...

It is a known issue on the current FireBug and they are aware of it and hopefully will fix it in the next release ..."

(In reply to steve.patco from comment #4)

for example https://processserverseminar.com/florida-counties-c-2/alachua-county-process-server-seminar-p-5.html

[Note: I've edited your URL in my quote here^ to remove the spaces, so that it's a valid/clickable link.)

So on that site, I suspect you're talking about this part:

[image] Alachua County
[text] larger image

If I click that, I do get a popup window, but it doesn't have any scrollbars... so I can't reproduce the issue that you're describing.

Perhaps you could include a screenshot showing the issue that you're seeing? Also, have you tested a fresh Firefox profile? (See about:profiles which lets you create a new profile for testing purposes; more info at https://support.mozilla.org/en-US/kb/profile-manager-create-remove-switch-firefox-profiles#w_manage-profiles-when-firefox-is-open . Note that a newly-created profile may automatically become your default profile, so you may need to click "set as default profile" on your original profile to restore it as the default after you've finished your testing.)

(In reply to steve.patco from comment #5)

10 years ago, someone reported this problem on a different forum. This was the response in that forum.

"This is most likely caused by having FireBug installed on FireFox ...

It is a known issue on the current FireBug and they are aware of it and hopefully will fix it in the next release ..."

Firebug was discontinued in 2017 (4 year ago) as shown in the timeline at https://getfirebug.com/, so this is unlikely to be relevant, unless you somehow still have Firebug installed...

Flags: needinfo?(steve.patco)
  1. Do you think I put spaces in the url by accident? Did you need help figuring out that the link was not clickable? I bet your grandson helped you troubleshoot that one......
  2. Scroll bars appear on my v91 firefox, the image is partial and needs to be dragged open.....Didnt notice that either?
  3. Firebug was discontinued in 2017. No kidding? Wow how did I miss that......NOT. It's still there with a different name i.e. developers tools. Firebug was an addon, developer tools are now part of firefox. I mentioned the firebug bug because the bug is mostly transferred to developers tool.

Have a look at chrome and edge with the same url (which I will include here so you are no longer confused by obfuscated urls).

https://processserverseminar.com/florida-counties-c-2/alachua-county-process-server-seminar-p-5.html

Flags: needinfo?(steve.patco)

Cannot attach image.

https://goldspot.us/bugzilla.png

Steve, there's no need to be rude -- the tone of your response isn't helping here. Please try to be respectful and civil, if you're wanting to get anywhere. See also https://bugzilla.mozilla.org/page.cgi?id=etiquette.html

Replying to your points:

  1. I only mentioned the spaces since I was "quoting" your comment, but also editing the quoted bit for clickability/convenience (i.e. my "quote" wasn't a true quote).

  2. I don't see any scrollbars or partial image on my end. That's why I requested a screenshot of the issue, which might help give clues about what's going wrong. (I see comment 8 now, thanks.)

  3. RE Firebug/devtools: if you have devtools open when the bug happens and that seems to be required to cause the bug, then that would be an interesting/important factor to note. If not, then they're not important -- Firefox's devtools are integrated in such a way that they have no effect unless/until you open them. I suspect the forum thread you found from 10 years back was about a different issue that happened to produce similar results.

RE comparing to Chrome / Edge, I actually do see a scrollbar in Chrome (but I don't see one in Firefox), interestingly.

I'm on Linux, incidentally, and it looks like you're on Windows. There may be some platform-specific differences with popup window default-sizing behavior, perhaps...

Interestingly: on macOS, Firefox/Chrome/Safari all produce a popup without any scrollbars.

Aha -- so your popup document is https://processserverseminar.com/index.php?main_page=popup_image&pID=5 , and if I look at the source of that document (downloading with curl), I see it has a resize() function that it immediately invokes, with some browser/platform-specific behavior:

<body id="popupImage" class="centeredContent" onload="resize();">
function resize() {
  i=0;
//  if (navigator.appName == 'Netscape') i=20;
  if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1 && window.navigator.userAgent.indexOf('SV1') != -1) {
      i=30; //This browser is Internet Explorer 6.x on Windows XP SP2
  } else if (window.navigator.userAgent.indexOf('MSIE 6.0') != -1) {
      i=0; //This browser is Internet Explorer 6.x
  } else if (window.navigator.userAgent.indexOf('Firefox') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
      i=25; //This browser is Firefox on Windows
  } else if (window.navigator.userAgent.indexOf('Mozilla') != -1 && window.navigator.userAgent.indexOf("Windows") != -1) {
      i=45; //This browser is Mozilla on Windows
  } else {
      i=80; //This is all other browsers including Mozilla on Linux
  }
  if (document.documentElement && document.documentElement.clientWidth) {
//    frameWidth = document.documentElement.clientWidth;
//    frameHeight = document.documentElement.clientHeight;

  imgHeight = document.images[0].height+40-i;
  imgWidth = document.images[0].width+20;

  var height = screen.height;
  var width = screen.width;
  var leftpos = width / 2 - imgWidth / 2;
  var toppos = height / 2 - imgHeight / 2;

    frameWidth = imgWidth;
    frameHeight = imgHeight+i;

  window.moveTo(leftpos, toppos);


//  window.resizeTo(imgWidth, imgHeight);
  window.resizeTo(frameWidth,frameHeight+i);

Do you know what the purpose of all that is? I would guess that's this is involved here (especially given that it has a Firefox-on-Windows special case, and Firefox-on-Windows is the configuration that you're saying is broken)...

I think you just need to use larger values in your resizeTo call there (near the bottom of the code snippet that I quoted in comment 12, from https://processserverseminar.com/index.php?main_page=popup_image&pID=5 )

The parameters in resizeTo() represent the full size of the browser window (including titlebar, window-border, etc.), so I think you need to account for those with the sizes that you pass in.

When I step through your pageload with a debugger, in Firefox-on-Windows, it looks like you're passing 220 and 216 to resizeTo(). This apparently isn't big enough to fit the image with the other browser components that are displayed.

If you change the Firefox-on-windows case to use you default i=80 value (instead of i=25), then that produces larger args for resizeTo which makes the window large enough that the image fits just fine. Probably that's what you want to do here...?

In any case, it doesn't seem that there's an actual Firefox bug here. The page in question is using a different size specifically in Firefox-on-Windows, which produces some broken behavior specifically in Firefox-on-Windows; and it works fine if you remove that special case.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: