Heya guys =)
@sickdelusion and @joatblog1, i have good news. After analizing this happening on @sickdelusion gallery, i think i discovered what caused the damned top scrolling.
And guess what, not a glitch. It was proposital. (why, gallery devs, why???) Anyway, here’s how i fixed it. (Btw i mostly use FF 7 when developing too. Even though i haven’t tested this solution in all browsers).
wp-content/plugins/nextgen-gallery/shutter/shutter-reloaded.js
Two lines to edit.
First let’s go to Line 157:
window.scrollTo(0,t.Top);
This line ALONE makes the window scroll to the top of the NG GALLERY DIV when you trigger the “hideShutter” action.
Now, Line 159:
document.documentElement.style.overflowX = '';
Even though i helped you guys through this, my javascript knowledge is still VERY limited, so i really don’t know how exactly a overflow-x css change can make your whole window scroll to the top, but it does. I’ll be glad if someone tell me how.
Why all of this happens and why had the dev put it into the code? That i do not know neither i feel like finding out now. Just comment both lines or either totally blast it out of your script if you’re feeling hardcore (or either frustated)
I did this on a new website i’m working on and it worked just fine. Actually, i noticed a little “flicking” on the background when you click on the image to open… but it only happens the first time you click on any image after the page loads.
(almost like the “hideShutter” trigger “FIXES IT” somehow. i really don’t have a single idea what is going on on this code, even though it’s fun to hack and slash through it.)
Anyway, if this fixes for both of you, please tell us. It worked for me.
Aaaand as a side off-topic note, @sickdelusion, i kinda enjoy your art style, you won yourself a new visitor. Gotta check more of your galleries when i get home.
Btw, i’m sleepy again. As always.