If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading to 1.5.x / pop up image window doesn't resize in Firefox desktop version

pop up image window doesn't resize in Firefox desktop version

Started by gtgeorge on 26 Nov 2020, 2:15 PM · Views: 4,253

Results 1 to 20 of 20
26 Nov 2020, 2:15 PM
#1
gtgeorge avatar

gtgeorge

New Zenner

Join Date:
Mar 2005
Posts:
53
Plugin Contributions:
0

pop up image window doesn't resize in Firefox desktop version

ZC 1.57b - no plugins - new install - php 7.2.30 (Zend: 3.2.0) - MySQL 5.7.30 Installing this version to test for upgrading our 1.56c storefront and noticed that when clicking larger image in Firefox 83.0 (64-bit) on my Win7 pro box produces a small popup window that does not resize to the image. All is well on my phone in Firefox as well as Microsoft Edge on my desktop. Anyone else experience this behavior?

26 Nov 2020, 6:35 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: pop up image window doesn't resize in Firefox desktop version

For product-general products, if you edit this file and remove the ",noreferrer" from the end of the first long line, does that solve the issue?
/includes/modules/pages/product_info/jscript_main.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Nov 2020, 6:57 PM
#3
gtgeorge avatar

gtgeorge

New Zenner

Join Date:
Mar 2005
Posts:
53
Plugin Contributions:
0

Re: pop up image window doesn't resize in Firefox desktop version

Yes it does!

26 Nov 2020, 7:51 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: pop up image window doesn't resize in Firefox desktop version

I'm guessing that the noreferrer, which also implies noopener, makes the window unaware that it was opened via window.open and therefore the resize function doesn't fire (because resize won't fire unless window.open called it), at least in Firefox.

The reason for noreferrer or noopener is to prevent window hijacking. But given these pages are internal only perhaps adding this was a bit overreaching.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

26 Nov 2020, 7:52 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: pop up image window doesn't resize in Firefox desktop version

Alternatively you could replace the popup stuff with a lightbox or modals, depending on what your template offers.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Nov 2020, 12:11 AM
#6
gtgeorge avatar

gtgeorge

New Zenner

Join Date:
Mar 2005
Posts:
53
Plugin Contributions:
0

Re: pop up image window doesn't resize in Firefox desktop version

I'm using a very lightly modified Responsive Classic Template and really try to keep changes and add ons to a minimum for easier/faster upgrades. Thanks for explaining it and I'll leave the file as modified to keep it simple. I made a note of the change if needed for future upgrades. I did notice the Responsive Classic Template and classic green both performed the same. I thought it weird so made sure I tested with vanilla installs out of the box.

27 Nov 2020, 2:24 AM
#7
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,974
Plugin Contributions:
8

Re: pop up image window doesn't resize in Firefox desktop version

DrByte:

I'm guessing that the noreferrer, which also implies noopener, makes the window unaware that it was opened via window.open and therefore the resize function doesn't fire (because resize won't fire unless window.open called it), at least in Firefox.

The reason for noreferrer or noopener is to prevent window hijacking. But given these pages are internal only perhaps adding this was a bit overreaching.

@DrByte; excellent information.

i too have found some problems that were corrected by removal of the noreferrer. that said, i use primarily chrome.

if this was an example of over-reaching, would be great to revisit it.

at this time, i can not speak of window hijacking; as my knowledge on the topic is nil.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

27 May 2021, 4:18 PM
#8
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,456
Plugin Contributions:
4

Re: pop up image window doesn't resize in Firefox desktop version

This solution works fine but on Firefox still coming up with scrollbars even though the script says not to have them. On Chrome behaves fine.

IDEASLady
IDEAS Creative Studio

Your image... our business!

5 Sep 2021, 12:24 PM
#9
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: pop up image window doesn't resize in Firefox desktop version

Yes for me too!, but it looks like that you also have to adjust the window width on the same line in that file. Default is set to 150x150.

ZC v1.5.7 "I was so much older then...I'm younger than that now" Cut the umbilical cord with webhosts after 20 years. FREEDOM!

5 Sep 2021, 12:35 PM
#10
pixelpadre avatar

pixelpadre

Suspended

Join Date:
Jun 2007
Location:
Eustis, Florida, USA, EARTH
Posts:
868
Plugin Contributions:
0

Re: pop up image window doesn't resize in Firefox desktop version

Retraction, problem persists in Firefox despite the changes mentioned above.

ZC v1.5.7 "I was so much older then...I'm younger than that now" Cut the umbilical cord with webhosts after 20 years. FREEDOM!

4 Mar 2022, 2:59 PM
#11
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: pop up image window doesn't resize in Firefox desktop version

This works for my 1.57c stock install relative to Firefox today:

// Twitch Base7 for 1.57c remove ,noreferrer to correct popup image load error
includes/modules/pages/product_info/jscript_main.php

replace this:

<script type="text/javascript"> function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150,noreferrer') } function popupWindowPrice(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=400,screenX=150,screenY=150,top=150,left=150,noreferrer') } **with this:** <script type="text/javascript"> function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150') } function popupWindowPrice(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=400,screenX=150,screenY=150,top=150,left=150') } </script>

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

4 Mar 2022, 3:57 PM
#12
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,456
Plugin Contributions:
4

Re: pop up image window doesn't resize in Firefox desktop version

That doesn't solve the issue (of the scrollbars).

IDEASLady
IDEAS Creative Studio

Your image... our business!

4 Mar 2022, 4:09 PM
#13
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: pop up image window doesn't resize in Firefox desktop version

I'll test the scrollbars issue one min.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

4 Mar 2022, 4:27 PM
#14
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: pop up image window doesn't resize in Firefox desktop version

When I add this:

overflow: hidden;

to the stylesheet.css for:

#productMainImage

The scrollbars are no more.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

4 Mar 2022, 6:03 PM
#15
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,456
Plugin Contributions:
4

Re: pop up image window doesn't resize in Firefox desktop version

That doesn't solve it for me neither. I tried different versions and different templates.

IDEASLady
IDEAS Creative Studio

Your image... our business!

5 Mar 2022, 4:46 PM
#16
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: pop up image window doesn't resize in Firefox desktop version

I would need to see the site/code to further troubleshoot.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

5 Mar 2022, 5:59 PM
#17
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,456
Plugin Contributions:
4

Re: pop up image window doesn't resize in Firefox desktop version

ideascg.com/sanbox

Also: tinythingsarecute.com

IDEASLady
IDEAS Creative Studio

Your image... our business!

6 Mar 2022, 3:51 PM
#18
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: pop up image window doesn't resize in Firefox desktop version

Are you using a module like Image Handler?

Your java is pointing to bmz_cache to fetch the image, a stock site does not.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

6 Mar 2022, 4:48 PM
#19
IDEASLady avatar

IDEASLady

Totally Zenned

Join Date:
Aug 2005
Location:
Trujillo Alto, Puerto Rico
Posts:
1,456
Plugin Contributions:
4

Re: pop up image window doesn't resize in Firefox desktop version

Yes, always.

IDEASLady
IDEAS Creative Studio

Your image... our business!

6 Mar 2022, 8:49 PM
#20
semi_crazy avatar

semi_crazy

New Zenner

Join Date:
Mar 2022
Location:
United States
Posts:
8
Plugin Contributions:
0

Re: pop up image window doesn't resize in Firefox desktop version

I've had the same trouble. I am using an Image Handler (zen_Image-Handler-5.2.0) I also installed zen_lightbox-1.6.b. No problems since installing lightbox and I like the nice smooth image transitions.