Image Zoom Bug?

The place to report Pale Moon specific bugs on the Windows operating system.

Moderator: satrow

User avatar
pmBill
Moon lover
Moon lover
Posts: 88
Joined: Sun, 21 Sep 2014, 08:52
Location: NorCal, USA

Image Zoom Bug?

Unread postby pmBill » Sat, 25 Aug 2018, 23:20

I assume this is some sort of a bug.

When I look at this image:

https://scontent.cdninstagram.com/vp/ba ... 4768_n.jpg

And then I right-click and Zoom In, it zooms, but I can't scroll to see the top. It just cuts it off.

(I also assume this is not an extension or Greasemonkey script problem)

PM 28.0.0 32-bit
Windows 10 64-bit

User avatar
back2themoon
Board Warrior
Board Warrior
Posts: 1268
Joined: Sun, 19 Aug 2012, 20:32

Re: Image Zoom Bug?

Unread postby back2themoon » Sat, 25 Aug 2018, 23:28

Scrolls normally here. Try Safe Mode, perhaps some extension/userscript is interfering.
Last edited by back2themoon on Sat, 25 Aug 2018, 23:29, edited 1 time in total.
Safe Mode / clean profile info: Help/Restart in Safe Mode
Information to include when asking for support - How to apply user agent overrides

Windows 10 Pro 1809 • Pale Moon • Interlink • Emsisoft Anti-Malware

doofy
Lunatic
Lunatic
Posts: 380
Joined: Mon, 14 Aug 2017, 23:43

Re: Image Zoom Bug?

Unread postby doofy » Sat, 25 Aug 2018, 23:34

I'm on Win7.

I had a look at your image in my main install of PM 28, on a fairly basic 28, and on FF 61.

I don't have rt click Zoom functionality. Maybe that's a Win10 thing? Or an extension thing?

You get same behaviour in safe mode?

User avatar
back2themoon
Board Warrior
Board Warrior
Posts: 1268
Joined: Sun, 19 Aug 2012, 20:32

Re: Image Zoom Bug?

Unread postby back2themoon » Sat, 25 Aug 2018, 23:37

If it's an extension or userscript that does the zooming, the problem is probably there.

However, this could be related: viewtopic.php?f=3&t=20122&p=149371
Safe Mode / clean profile info: Help/Restart in Safe Mode
Information to include when asking for support - How to apply user agent overrides

Windows 10 Pro 1809 • Pale Moon • Interlink • Emsisoft Anti-Malware

User avatar
helloimustbegoing
Board Warrior
Board Warrior
Posts: 1895
Joined: Thu, 28 Jun 2012, 01:20

Re: Image Zoom Bug?

Unread postby helloimustbegoing » Sat, 25 Aug 2018, 23:43

Off-topic:
When I right click on the image, I get no zoom function. Is this missing from the Linux PM builds?

tenseys
Lunatic
Lunatic
Posts: 484
Joined: Tue, 15 Sep 2015, 09:09
Location: NYC

Re: Image Zoom Bug?

Unread postby tenseys » Sat, 25 Aug 2018, 23:51

I'm on Win 10 64 bit and I don't have right click zoom. I can press control + and zoom in and scroll normally with no issues.

(Can also be done by holding control and using scroll wheel)
Last edited by tenseys on Sun, 26 Aug 2018, 00:01, edited 1 time in total.
I'm using Pale Moon version 28.1.0 (64-bit) on Windows 10 Home 64-bit.

User avatar
helloimustbegoing
Board Warrior
Board Warrior
Posts: 1895
Joined: Thu, 28 Jun 2012, 01:20

Re: Image Zoom Bug?

Unread postby helloimustbegoing » Sun, 26 Aug 2018, 00:05

tenseys wrote:
(Can also be done by holding control and using scroll wheel)

Thanks for that bit of info. And I did get a scroll bar when I tested it with the OP's link.

User avatar
pmBill
Moon lover
Moon lover
Posts: 88
Joined: Sun, 21 Sep 2014, 08:52
Location: NorCal, USA

Re: Image Zoom Bug?

Unread postby pmBill » Sun, 26 Aug 2018, 01:30

Yes, it is an extension, AND/OR a Greasemonkey script, that are changing the
zoom factor of the image and it is confusing Pale Moon.

I messed with it, and the Keyboard Ctrl++, Ctrl+-, Ctrl+0 and Control Scroll work,
UNLESS either the extension or Gm modifies the image size, and then there are
some weird side-effects, as well.

It used to work, though, prior to v28. Although there were a few anomalies then, just not as bad or as many.

I suppose the extension is Image Zoom 0.6.3.1.signed.1-signed.

See image snapshot attachment.

Below is my Gm Script that lets me double-Click the image to toggle through some sizing.

I think Pale Moon should deal with a GmScript changing the size of an image programmatically
and "see that" and then allow it to scroll.

So I think (am pretty sure) it is still a BUG.

Code: Select all

/*
   dblclkimgzoom.user.js

   Double Click Image Zoom.

   Author:   William Donnelly. Copyright (c) 2004-2013. All right reserved. Etc...
   Contact:  donnelly-house.net | bill
   See:      http://www.donnelly-house.net/

   Double Click Image Zoom.    (2013)
   Zoom images that are double clicked on, in and out, using integer scaling factors (* 2, * 3, etc.),
   until they fill the screen, and then reverse the zoom direction. Rinse, repeat.
   Also automatically makes very large images fit to screen instead of Zoom In. (toggled back to original size)
   If an image almost fits the screen, it is assumed that a full 2 * zoom in is desired.

   Ver 2.0.0  Revamped, recoded, extended.  (4/2013)
   Ver 1.0.0  First attempt.  (7/2005)
*/

// userscript metadata follows...

// ==UserScript==
// @name          Double Click Image Zoom
// @namespace     http://www.donnelly-house.net/
// @description   Zoom images in and out and fit to screen that are double clicked on
// @include       *
// @exclude       *.donnelly-house.net/programming/cdp1802/simelf/*

// @Version       2.0.0
// @Firefox       ~19+ (probably most/all lower versions)
// @GmVersion     1.8
// @Author        William Donnelly
// @Email         donnelly-house.net | bill
// ==/UserScript==

function zoomImage (eEvent) {    // 'this' refers to the image for this double click event handler

   if (unsafeWindow.whd_NoZoomImage)
      return;

   if (this.zoomInitialHeight == null) {      // set our initial values for the image object if not present
      this.zoomInitialWidth = this.width;
      this.zoomInitialHeight = this.height;
      this.zoomScalingFactor = 1;            // original size
      this.zoomScalingDirection = 1;         // zoom in (enlarge) -- (-1 = zoom out (reduce);  0 = special fit image toggle flag)
   }

   var nMaxWidth = window.innerWidth - 20;
   var nMaxHeight = window.innerHeight - 20;

   if (this.zoomScalingDirection == 1) {     // zoom in (enlarge),  or FIT image
      if (((this.width > nMaxWidth  ||  this.height > nMaxHeight)  &&
            !eEvent.ctrlKey)  ||  eEvent.shiftKey) {   // Fit 'small' images; Ctrl key overrides FIT image and does a zoom in; Shift key FIT's!
         if (this.zoomScalingFactor == 1  &&  ( ((this.zoomInitialWidth - nMaxWidth) < 100  &&  (this.zoomInitialHeight - 100) < nMaxHeight)   ||
               ((this.zoomInitialHeight - nMaxHeight) < 100  &&  (this.zoomInitialWidth - 100) < nMaxWidth) ) ) {   // if image is slightly larger than screen
            ++this.zoomScalingFactor;     // try to zoom in (enlarge)

            var nWidth = this.zoomScalingFactor * this.zoomInitialWidth;
            var nHeight = this.zoomScalingFactor * this.zoomInitialHeight;

            this.width = nWidth;
            this.height = nHeight;
            status = 'Image zoom = ' + this.zoomScalingFactor + '  on ' + nMaxWidth + 'w X ' + nMaxHeight + 'h';

         } else {
            var wfactor = nMaxWidth / this.zoomInitialWidth;
            var hfactor = nMaxHeight / this.zoomInitialHeight;

            nScalingFactor = ((wfactor < hfactor) ? wfactor : hfactor);
            status = 'Image zoom = ' + nScalingFactor + '  on ' + nMaxWidth + 'w X ' + nMaxHeight + 'h';

            this.width = (nScalingFactor * this.zoomInitialWidth).toFixed();
            this.height = (nScalingFactor * this.zoomInitialHeight).toFixed();

            this.zoomScalingDirection = -1;     // reverse zoom direction (to zoom out (reduce)), Scaling Factor unchanged

            if (this.zoomScalingFactor != 1) {
               this.zoomScalingFactor = nScalingFactor.toFixed() - 1;    // special correction needed for 'ctrlKey super-enlarged images'

               if (this.zoomScalingFactor < 1)
                  this.zoomScalingFactor = 1;
            }
         }

      } else {    // we're in zoom in (enlarge) mode
         ++this.zoomScalingFactor;     // try to zoom in (enlarge)

         var nWidth = this.zoomScalingFactor * this.zoomInitialWidth;
         var nHeight = this.zoomScalingFactor * this.zoomInitialHeight;
         var bAllowZoomIn = ( this.zoomScalingFactor == 2  &&
            ( ((nMaxWidth - this.zoomInitialWidth) < 500  &&  this.zoomInitialHeight < nMaxHeight)          ||
               ((nMaxHeight - this.zoomInitialHeight) < 200  &&  this.zoomInitialWidth < nMaxWidth)         ||
               ((this.zoomInitialWidth - nMaxWidth) < 100  &&  (this.zoomInitialHeight - 100) < nMaxHeight)   ||
               ((this.zoomInitialHeight - nMaxHeight) < 100  &&  (this.zoomInitialWidth - 100) < nMaxWidth) ) );

         if (((nWidth > nMaxWidth  ||  nHeight > nMaxHeight)  &&  !eEvent.ctrlKey  &&  !bAllowZoomIn)  ||  eEvent.shiftKey) {      // if zoom overflow, fit to screen and reverse zoom direction; Shift key FIT's!
            var wfactor = nMaxWidth / this.zoomInitialWidth;
            var hfactor = nMaxHeight / this.zoomInitialHeight;

            var nScalingFactor = ((wfactor < hfactor) ? wfactor : hfactor);
            status = 'Image zoom = ' + nScalingFactor + '  on ' + nMaxWidth + 'w X ' + nMaxHeight + 'h';

            this.width = (nScalingFactor * this.zoomInitialWidth).toFixed();
            this.height = (nScalingFactor * this.zoomInitialHeight).toFixed();

            --this.zoomScalingFactor;           // correct scaling factor for next zoom out
            this.zoomScalingDirection = -1;     // reverse zoom direction (to zoom out (reduce))

            if (this.zoomScalingFactor < 1)
               this.zoomScalingFactor = 1;

         } else {    // allow zoom in
            this.width = nWidth;
            this.height = nHeight;
            status = 'Image zoom = ' + this.zoomScalingFactor + '  on ' + nMaxWidth + 'w X ' + nMaxHeight + 'h';
         }
      }

   } else {    // zoom out (reduce) mode -- Scaling Factor should be set to 'next reduction value' (>= 1)
      if (eEvent.shiftKey) {     // Shift key FIT's now!
         var wfactor = nMaxWidth / this.zoomInitialWidth;
         var hfactor = nMaxHeight / this.zoomInitialHeight;

         nScalingFactor = ((wfactor < hfactor) ? wfactor : hfactor);
         status = 'Image zoom = ' + nScalingFactor + '  on ' + nMaxWidth + 'w X ' + nMaxHeight + 'h';

         this.width = (nScalingFactor * this.zoomInitialWidth).toFixed();
         this.height = (nScalingFactor * this.zoomInitialHeight).toFixed();

         if (this.zoomScalingFactor != 1) {
            this.zoomScalingFactor = nScalingFactor.toFixed() - 1;    // reduce to next smallest size

            if (this.zoomScalingFactor < 1)
               this.zoomScalingFactor = 1;
         }


      } else {    // normal zoom out (reduce) processing
         if (eEvent.ctrlKey) {      // assumes use immediately after FIT to screen
            ++this.zoomScalingFactor;           // correct Scaling Factor to previous value
            this.zoomScalingDirection = 1;      // reverse zoom direction (to zoom in (enlarge))

            this.width = this.zoomScalingFactor * this.zoomInitialWidth;
            this.height = this.zoomScalingFactor * this.zoomInitialHeight;
            status = 'Image zoom = ' + this.zoomScalingFactor + '  on ' + nMaxWidth + 'w X ' + nMaxHeight + 'h';

         } else {
            this.width = this.zoomScalingFactor * this.zoomInitialWidth;
            this.height = this.zoomScalingFactor * this.zoomInitialHeight;
            status = 'Image zoom = ' + this.zoomScalingFactor + '  on ' + nMaxWidth + 'w X ' + nMaxHeight + 'h';

            if (--this.zoomScalingFactor < 1) {
               this.zoomScalingFactor = 1;
               this.zoomScalingDirection = 1;      // reverse zoom direction (to zoom in (enlarge))
            }
         }
      }
   }

   return;
} // zoomImage


function attachToImages() {

   try {

      var nImages = unsafeWindow.document.images.length;

      for (var nImgLoop = 0;  nImgLoop < nImages;  ++nImgLoop) {

         var wImage = unsafeWindow.document.images[nImgLoop];
         if (wImage.parentNode.nodeName.toUpperCase() != "A")  // don't do links
            if (wImage.getAttribute ('nodoubleclickzoom') != 'true')     // ignore specially-marked images
               wImage.addEventListener ("dblclick", zoomImage, false);

      }

      var nFrames = unsafeWindow.frames.length;

      for (var nFrmLoop = 0;  nFrmLoop < nFrames;  ++nFrmLoop) {

         nImages = unsafeWindow.frames[nFrmLoop].document.images.length;

         for (nImgLoop = 0;  nImgLoop < nImages;  ++nImgLoop) {

            var fImage = unsafeWindow.frames[nFrmLoop].document.images[nImgLoop];
            if (fImage.parentNode.nodeName.toUpperCase() != "A")  // don't do links
               if (fImage.getAttribute ('nodoubleclickzoom') != 'true')     // ignore specially-marked images
                  fImage.addEventListener ("dblclick", zoomImage, false);

         } // for

      } // for

   } catch (eErr) { };   // do nothing if something weird occurs

   return;
} // attachToImages

window.addEventListener ("load", attachToImages, false);    // perform mods at onload if non-image document
attachToImages();    // for image documents
Attachments
pmsnap02.png

doofy
Lunatic
Lunatic
Posts: 380
Joined: Mon, 14 Aug 2017, 23:43

Re: Image Zoom Bug?

Unread postby doofy » Sun, 26 Aug 2018, 02:21

pmBill wrote:So I think (am pretty sure) it is still a BUG.

Well, a browser's function is to be a browser, yes?

An extension's function is to modify the behaviour of a browser. Extension's functionality is browser specific as any fule no.
GM scripts are generally designed to modify a browser's behaviour. It is entirely irrelevant that you've modified the GM script.

So what do we have here?

We have PM 28, which is a major rebuild - it is *not* a simple PM 27 "upgrade".

And we have a user running a FF extension along with a modified GM script, complaining that functionality has changed between PM 27 and PM 28.

And then reporting as a "bug" the fact that PM has not adapted correctly to his (possibly unique) working environment.

This is not a PM bug; it's a bug at the chair/kb interface.

Trapper852
Moonbather
Moonbather
Posts: 67
Joined: Fri, 29 Jan 2016, 00:21

Re: Image Zoom Bug?

Unread postby Trapper852 » Sun, 26 Aug 2018, 02:33

There is a very elegant & simple answer to get this functionality if you don't have it natively.

Install Image Zoom 0.6.3.1

Works beautifully! I've used it for years & would be lost without it. :thumbup:

User avatar
pmBill
Moon lover
Moon lover
Posts: 88
Joined: Sun, 21 Sep 2014, 08:52
Location: NorCal, USA

Re: Image Zoom Bug?

Unread postby pmBill » Sun, 26 Aug 2018, 07:56

doofy wrote:
pmBill wrote:So I think (am pretty sure) it is still a BUG.

Well, a browser's function is to be a browser, yes?
{snip}
This is not a PM bug; it's a bug at the chair/kb interface.


NO.

It IS a BUG.

It doesn't matter WHY an image is resized.

The browser SHOULD understand that fact, and deal with it accordingly, AS IT ALWAYS HAS, as one would EXPECT it to do.
(as, NO DOUBT, ALL other browsers also do, as a person would EXPECT it to act)

Unless the developers blow this off and don't deal with it, it will most likely be acknowledged as a BUG and FIXED at some point, as it SHOULD BE.

It is NO DIFFERENT from some JavaScript executing as a script in the document and changing an image size programmatically.
In that instance, AS WELL, the browser should treat the re-sized image appropriately. And NOT not allow it to be scrolled because it
doesn't recognize, for whatever reasons, that is has been re-sized.

I have used that GmScript in Firefox AND Pale Moon for MANY years, and it most likely would work fine equivalently
in Opera, Chrome, Edge, and IE.
Last edited by pmBill on Sun, 26 Aug 2018, 08:14, edited 1 time in total.

User avatar
pmBill
Moon lover
Moon lover
Posts: 88
Joined: Sun, 21 Sep 2014, 08:52
Location: NorCal, USA

Re: Image Zoom Bug?

Unread postby pmBill » Sun, 26 Aug 2018, 07:59

Trapper852 wrote:There is a very elegant & simple answer to get this functionality if you don't have it natively.

Install Image Zoom 0.6.3.1

Works beautifully! I've used it for years & would be lost without it. :thumbup:


The version I'm using works fine.
(unless upgrading "fixes" the problem I am seeing, but, because it is also happening in a GmScript, I HIGHLY doubt that wold be the case)
I might upgrade to the newer version.
You have to be careful with that because they are making changes that ONLY work in the newer versions of Firefox
that break in Pale Moon, so I am wary of doing that -- I don't know why it is not auto-updating)

I looked at the latest (working) version and the release notes state: "Fixed defect with german language implementation", so, no.
Last edited by pmBill on Sun, 26 Aug 2018, 08:02, edited 1 time in total.

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1576
Joined: Thu, 03 Sep 2015, 19:47
Location: UA
Contact:

Re: Image Zoom Bug?

Unread postby JustOff » Sun, 26 Aug 2018, 08:04

I'm pretty sure that the bug is in the script which does not scale images properly :coffee:
Here are the add-ons I made in a spare time. That was fun!

User avatar
billmcct
Lunatic
Lunatic
Posts: 445
Joined: Tue, 04 Sep 2012, 15:19
Location: Atlanta Georgia USA

Re: Image Zoom Bug?

Unread postby billmcct » Sun, 26 Aug 2018, 11:53

I have had Image Zoom 0.6.3.1-signed.1-signed installed for quite some time and it is a problem in the addon. Has always had this problem except when using ctrl key.
Win 7 x64 - Pale Moon 28x x32

User avatar
therube
Astronaut
Astronaut
Posts: 676
Joined: Fri, 08 Jun 2018, 17:02

Re: Image Zoom Bug?

Unread postby therube » Sun, 26 Aug 2018, 15:53

And then I right-click and Zoom In, it zooms, but I can't scroll to see the top. It just cuts it off.

Confirmed.
And yes, thinking it will be a bug in the extension.

Off-topic:
Also note, that when an image has focus, a right-click context-menu action takes two right-clicks for the context-menu to show up.
(Also related to Image Zoom.)
Last edited by therube on Sun, 26 Aug 2018, 15:54, edited 1 time in total.

User avatar
pmBill
Moon lover
Moon lover
Posts: 88
Joined: Sun, 21 Sep 2014, 08:52
Location: NorCal, USA

Re: Image Zoom Bug?

Unread postby pmBill » Sun, 26 Aug 2018, 21:04

billmcct wrote:I have had Image Zoom 0.6.3.1-signed.1-signed installed for quite some time and it is a problem in the addon. Has always had this problem except when using ctrl key.


I've never had any real problems with Image Zoom, and I've used it for years, in Pale Moon and Firefox.
It does act mildly tweaky at times, with THE BROWSER seemingly "getting confused".

But, because the problem I state also occurs in a GmScript, and (most likely) WOULD occur in ANY JavaScript
that is contained in a loaded (HTML) "document" (group -- w/inline and included JS; I don't know if that has an 'overall name'),
AND the fact that it worked fine for MANY years until now, STRONGLY suggests that it is obviously a BUG in Pale Moon, and
NOT some external thing.

I could do some additional testing and such, with Pale Moon and other browsers, but isn't that the Development Group's job?

Unless you would just rather ignore it until enough people complain about it or point it out that you can't.
(and/or 'you' personally notice something isn't right)

User avatar
helloimustbegoing
Board Warrior
Board Warrior
Posts: 1895
Joined: Thu, 28 Jun 2012, 01:20

Re: Image Zoom Bug?

Unread postby helloimustbegoing » Sun, 26 Aug 2018, 21:48

It's the responsibility of the developer of the extension to make things compatible, not the developer of the browser.

User avatar
JustOff
Localization Coordinator
Localization Coordinator
Posts: 1576
Joined: Thu, 03 Sep 2015, 19:47
Location: UA
Contact:

Re: Image Zoom Bug?

Unread postby JustOff » Sun, 26 Aug 2018, 21:55

There is no such a kind of bug as "the browser does not work with the extension X". Until someone is narrowed down the problem to the specific browser API call used by this extension that does not work as promised, the bug is assumed to be in the extension itself. Here's how it works.
Here are the add-ons I made in a spare time. That was fun!

User avatar
pm4eva
Apollo supporter
Apollo supporter
Posts: 33
Joined: Tue, 12 Jun 2018, 10:26
Location: CET

Re: Image Zoom Bug?

Unread postby pm4eva » Mon, 03 Sep 2018, 23:49

Tested it with Firefox ESR 52.9.0 and the pic also is cutted.
So its a problem with the addon itself.
thx and greets

User avatar
pmBill
Moon lover
Moon lover
Posts: 88
Joined: Sun, 21 Sep 2014, 08:52
Location: NorCal, USA

Re: Image Zoom Bug?

Unread postby pmBill » Tue, 04 Sep 2018, 04:23

No.

There is NO SUCH THING as "didn't 'zoom' (modify the size of) the image correctly."

IT IS SIMPLE JAVASCRIPT. (executed in the Greasemonkey script, but it could be executed ANYWHERE JS can be executed)

You SHOULD NOT be able to modify the size of an image and the browser not display that image correctly AT ALL TIMES.

AS IT HAS ALWAYS DONE. (and "ALL BROWSERS DO")

You can try to make excuses or justifications or rationalizations or anything like that, but they are complete and utter BULLSHIT and WRONG.


Return to “Bug reports (Windows)”

Who is online

Users browsing this forum: van p and 4 guests