samtiria / nextgen-gallery

Automatically exported from code.google.com/p/nextgen-gallery
0 stars 0 forks source link

FF Bug Workaround: Scrolling to top after closing image #381

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Visit any page taller than the viewport / with an image "below" the default 
scroll position (e.g. http://www.techwarelabs.com/cubitek-tattoo-pro-case/all/1 
) using Firefox 3.6, 4.0, or 5.0)
2. Click an image thumbnail
3. Click the full size image to close it

What is the expected output? What do you see instead?
The page should remain in its current vertical scroll location. In FF, the page 
is scrolled to the top when document.documentElement.style.overflowX = ''; is 
set in hideShutter : function().

What version of the product are you using? On what operating system?
shutter-reloaded.js version 1.3.2 (though this does *not* appear to be fixed in 
the latest version of shutter-reloaded (2.0.1, at the time of this posting).

Please provide any additional information below.
Patch:
--- shutter-reloaded-orig.js    2011-07-06 15:58:49.000000000 -0500
+++ shutter-reloaded.js 2011-07-06 15:59:22.000000000 -0500
@@ -153,10 +153,10 @@
                if ( D = t.I('shDisplay') ) D.parentNode.removeChild(D);
                if ( S = t.I('shShutter') ) S.parentNode.removeChild(S);
                t.hideTags(true);
-               window.scrollTo(0,t.Top);
-               window.onresize = t.FS = t.Top = t.VP = null;
                document.documentElement.style.overflowX = '';
                document.onkeydown = null;
+               window.scrollTo(0,t.Top);
+               window.onresize = t.FS = t.Top = t.VP = null;
        },

        resize : function(ln) {

Original issue reported on code.google.com by omega...@gmail.com on 6 Jul 2011 at 9:23

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
How do you implement this patch? Thank you

Original comment by jonathan...@gmail.com on 24 Dec 2011 at 2:28

GoogleCodeExporter commented 8 years ago
hi Jonathan,

I think I understand what the rather opaque but correct solution given above 
requires on our (the users') part.  the minus sign means: delete that line.  
the plus signs means: add this line.  As I recall, I also needed to add the 
"onkeydown" line.  And that did seem to make the thing work right, as you 
request. 

Make this section of your shutter-reloaded.js file just like the one above, 
minus the lines that have a minus sign at their beginning.

good luck
raymond berkeley ca.

Original comment by rbargl...@gmail.com on 30 Dec 2011 at 10:14

GoogleCodeExporter commented 8 years ago
Thank you very much for this explanation.

Original comment by jonathan...@gmail.com on 30 Dec 2011 at 10:25