jasadams / imagezoom

Image Zoom addon for Firefox
14 stars 12 forks source link

Not working properly since ff 47 #33

Open roger21 opened 8 years ago

roger21 commented 8 years ago

since ff 47, zooming on a image may end up with the top of the image being hidden out of the page while the scroll bar of the page is maxed up

either from the mouse scroll or from choosing a zoom value from context menu

also either from the image being viewed alone or from inside a web page

uninstalling / reinstalling changes nothing

HulkSmashBurgers commented 8 years ago

I'm also having this problem. Hoping for an update.

chi-mira-81 commented 8 years ago

Four photos prove point (w/percentage(s) shown); Keep in mind the page scroll on upper right corner vs. top of image. imagezoom 100 imagezoom 150 -99- imagezoom 200 imagezoom 400

jmboyerii commented 8 years ago

Having the same problem - one work around is enlarge using the control key instead of the left mouse button - seems to work, but yeah, would love to see this get resolved.

ferdnyc commented 8 years ago

@jmboyerii wrote:

one work around is enlarge using the control key instead of the left mouse button

Really? I find that doesn't make any difference, on my Firefox 47.0 linux-x86_64 (Build ID 20160606100503). When the image zooms, it sticks outside of the vertical viewport... aha. Wait, no, I take that back.

It seems that, if I've used ImageZoom to zoom the image, then at first zooming by Ctrl-scroll or Ctrl-+ will cause the image to slide off the top of the viewport. But then, once I zoom far enough, it crosses some threshold (probably, the zoom level where it would be larger than the window if zoomed from the default size), it "jumps" down to make the whole thing visible.

And if I haven't used any ImageZoom functions at all, then it stays visible right from when I start zooming. So, yeah, it's definitely something ImageZoom is doing that's throwing off Firefox's built-in image rendering.

FredZ859 commented 8 years ago

I have the same problem. So, no fix yet?

roger21 commented 8 years ago

i made an ugly fix

http://roger21.free.fr/test/image_zoom-0.6.3-sm+tb+fx.r21.01.xpi (right click -> save as...)

the mix between firefox's image-zoom and image-zoom's zoom get a little bit more dirty on some case

(you'll need xpinstall.signatures.required at false if you want to try it)

ferdnyc commented 8 years ago

Here's @roger21 's fix as a patch against the overlay.js from AMO's imagezoom 0.6.3.1. I haven't had a chance to try it myself, yet.

--- a/chrome/content/overlay.js
+++ b/chrome/content/overlay.js
@@ -533,20 +533,25 @@
     // Zoom to a factor of the current image size
     function zoom(factor) {
       if (enabled) {
-
         pImage.zoomFactor = pImage.zoomFactor * factor;
         pImage.autoFitBefore = 0;
+        pImage.style.marginTop="";
         // Zoom the width style if it exists
         if (pImage.style.width) {
           var origWidth = getDimInt(pImage.style.width);
           pImage.style.width = (origWidth * factor) + getDimUnit(pImage.style.width);
         }
-
         // Zoom the height style if it exists
         if (pImage.style.height) {
           var origHeight = getDimInt(pImage.style.height);
           pImage.style.height = (origHeight * factor) + getDimUnit(pImage.style.height);
-
+        }
+        pImage.style.maxWidth = "none";
+        pImage.style.maxHeight = "none";
+        if(pImage.y < 0 || pImage.offsetTop < 0){
+          pImage.style.marginTop="0";
+        } else {
+          pImage.style.marginTop="";
         }
       }
     }
@@ -721,6 +726,7 @@
     }

     function pZoomAbs() {
+      pImage.style.marginTop="";
       // only set the width style if it was originally set
       if (pImage.originalWidth) {
         pImage.style.width = (pImage.originalWidth * (pImage.zoomFactor / 100)) + pImage.originalWidthUnit;
@@ -732,6 +738,13 @@
         pImage.style.height = (pImage.originalHeight * (pImage.zoomFactor / 100)) + pImage.originalHeightUnit;
       } else {
         pImage.style.height = "";
+      }
+      pImage.style.maxWidth = "none";
+      pImage.style.maxHeight = "none";
+      if(pImage.y < 0 || pImage.offsetTop < 0){
+        pImage.style.marginTop="0";
+      } else {
+        pImage.style.marginTop="";
       }
     }
Lunarhawk commented 8 years ago

Having this same issue, hope an 'official' fix is out soon but I dont think this has had an official update in years heh

jmboyerii commented 8 years ago

their official fix it seems is to let their business and end consumers go by the way side - which is cool, crap all over us what difference does it make thanks for sharing the scripts

On Sat, Jul 16, 2016 at 4:37 PM, Lunarhawk notifications@github.com wrote:

Having this same issue, hope an 'official' fix is out soon but I dont think this has had an official update in years heh

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jasadams/imagezoom/issues/33#issuecomment-233152306, or mute the thread https://github.com/notifications/unsubscribe-auth/ATDyaWhFi8R_yiD3n8AB_nhLYyv1XxCMks5qWU8RgaJpZM4IzV3t .

Thank you James

Lunarhawk commented 8 years ago

@roger21 hope you see this just got FF48 and the add on no longer works even with signatures set to false. Not sure if you can do anything about that

roger21 commented 8 years ago

oh indeed, i didn't think about that since i use the ESR version of firefox that doesn't block the addons without proper signature (yet) ... (and also because i was pretty sure nobody uses my ugly fix)

welp, idk, i guess i'll try to submit it to amo ? (later though)

edit: just to be clear, the addon is straight gpl licensed, and actually needs to be fully rewritten (and i'm not the guy that will do that, i only do lazy ugly fixes), so if anybody feels like going for it, please do

ferdnyc commented 8 years ago

@roger21 It appears (though I haven't gone down this road myself, just discovered it in bug research for another extension) that Mozilla has an API allowing unlisted add-ons to be put through a totally-automated signing process. See the FAQ at the Extension Signing wiki page starting at "How do I get my add-ons signed if they are not hosted on addons.mozilla.org (AMO)?", and the updated developer Review Policies for details on unlisted add-ons.

So, it may be sufficient to just run your extension through that, and then pass around the autosigned result here on github.

roger21 commented 8 years ago

here you go https://addons.mozilla.org/en-US/firefox/addon/image-zoom-ugly-attempt/

@ferdnyc i already had two addons on amo so i figure i could add a fully reviewed one, but they must have improved that thingy because i was not fully aware of that unlisted+web install (or preliminary reviewed) way and it is definitely an interesting feature, i thought the only way to use a crappy home-made or copyright-infringing modified add-on was to use the Unbranded Build of Firefox or use the current ESR version, but no, you can indeed submit (almost) anything and it get signed almost instantly (i tried, it works) and then use your add-on with any Firefox version you want, so that's pretty nice.

Zorrototo commented 8 years ago

Thanks, will try this fixed version, I just noticed today I made a duplicate bug report (was checking for answers). Anyway, this addon is abandoned since May 27 2013 see proof here http://imagezoom.yellowgorilla.net/ (something I also noticed today before coming here).

roger21 commented 7 years ago

is it just me or does this issue doesn't exist anymore with the original addon????

with firefox esr 45.5

ferdnyc commented 7 years ago

@roger21: Your original report says the issue started with FF 47. 45.5 is less than 47.

Zorrototo commented 7 years ago

Current FF version is 50

roger21 commented 7 years ago

hmmm, i was thinking firefox esr 45.5 = firefox 50 but indeed firefox esr 45 = firefox 45 so the issue not being present might totally genuinely and legitimately be absolutely irrelevant

therefore, nevermind

roger21 commented 7 years ago

i put a 0.1.1 of Image Zoom (ugly fixes) on amo https://addons.mozilla.org/en-US/firefox/addon/image-zoom-ugly-attempt/versions/ but i haven't tested it on a 50.x (still 45 esr here)

the 0.1.0 was all broken (except the zoom scroll and #23)

any volunteer to test it ? (it is suppose to just fix the previous broken thing while still kind of fixing this issue and issue #23)

(i know, this is the single most ugly add-on maintenance ever)

also still waiting for amo review nevermind just reviewed

Zorrototo commented 7 years ago

FF 50.0.2 with 0.1.0 ugly fix works good in my opinion. Maybe using latest FF would be more simple than 'fixing' the module? Anyway, your decision to use outdated software and 'fixing' updated modules :D (I put fixing in between quotes because I don't consider it a fix when there is actualy no problem :P).

roger21 commented 7 years ago

hmm... so the problem with 0.1.0 was actually testable on 45 (all the features except scroll zoom and #23 were broken due to a stupid late refactoring)

what i can't test on 45 is this issue ( #33 )

so i was hopping that having tested this fix ( #33 ) with 0.1.0 on a 47+ and having tested the 0.1.0-being-broken fix with 0.1.1 on a 45 would make a base for full testing... (i guess laziness is a full job that requires a lot of thinking)

then if one of you or on the add-on page says it doesn't work i would switch to a 50+ for more testing and fixing attempt...

(isn't there a replacement for this add-on yet -_-')