tward16 / pwi

Automatically exported from code.google.com/p/pwi
0 stars 0 forks source link

annoying window scroll #123

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Put 2 albums in same page with paging displayed
2. go to second album and try to press next (or previous) photo
   button in paging section
3. next photo is displayed but view port is scrolled back to top of
   the page, so that to see next photo you have to go back manually
   to photo location.
   In my example I'm using album in blogger post, but you can imagine
   having html page for press release with lot of text description 
   at the beginning and album snapshot at the bottom. 
   For each inline next photo you will have to scroll down to see 
   the next image.

What is the expected output? What do you see instead?
have new image displayed without returning on top of the page. At least if 
there is a good reason to going back to top
of the page, why don't we have an option (boolean) to apply or not
this action.

What version of the product are you using? On what browser and version and 
operating system?
reproduced on any browser with pwi latest

Link to site showing the described behaviour:
http://test-pwicolorbox.blogspot.fr/

Please provide any additional information below.
I'm wondering if this annoying problem is not due to
line 551 : window.scrollTo(0,0); 
called in album function in pwi.js

Regards

Original issue reported on code.google.com by lescheminsdeleau on 7 May 2013 at 8:04

GoogleCodeExporter commented 9 years ago
This is used when showing a larger collection of photos, to make sure that when 
going to the next page the first photo's are shown, and not only the photo's at 
the end. I will have to look into this

Line 551 is indeed causing this behavior.

BTW: I like the way you integrated PWI into Blogspot. Good work!

Original comment by borkh...@gmail.com on 7 May 2013 at 9:10

GoogleCodeExporter commented 9 years ago
Removing window.scrollTo(0,0) seems to fix it, and it doesn't seem to affect 
the plugin in any way other than to fix it.

Original comment by socialme...@wshg.net on 4 May 2015 at 11:38