kthornbloom / Smoothproducts

A simple, lightweight and responsive product image viewer using jQuery
kthornbloom.com/smoothproducts
185 stars 89 forks source link

Scroll jump on thumbnail click #34

Open chupakasmgn opened 7 years ago

chupakasmgn commented 7 years ago

Mostly plugin works perfectly but some times then click on thumbnail it jump down scroll. How fix it?

kthornbloom commented 7 years ago

Hi, I'm not sure exactly what you mean. The whole page is scrolling down?

chupakasmgn commented 7 years ago

Hi. Yes. here video https://drive.google.com/file/d/0B6o6csL6paN-YmY3OFFKd0xQNDQ/view Site: rollup24.ru-------- Исходное сообщение --------Тема: Re: [kthornbloom/Smoothproducts] Scroll jump on thumbnail click (#34)От: Kevin Thornbloom Кому: kthornbloom/Smoothproducts Копия: chupakasmgn ,Author Hi, I'm not sure exactly what you mean. The whole page is scrolling down?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kthornbloom/Smoothproducts","title":"kthornbloom/Smoothproducts","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kthornbloom/Smoothproducts"}},"updates":{"snippets":[{"icon":"PERSON","message":"@kthornbloom in #34: Hi, I'm not sure exactly what you mean. The whole page is scrolling down?"}],"action":{"name":"View Issue","url":"https://github.com/kthornbloom/Smoothproducts/issues/34#issuecomment-290414104"}}}

ats3v commented 7 years ago

Hi, We have exactly the same issue. What can we do? Thanks!

kthornbloom commented 7 years ago

Hey guys. I am having trouble replicating this bug. I'd be happy to look at it if someone can provide a simplified test where I can check out the code.

ats3v commented 7 years ago

Hey, thank you very much for your response. The problem does not happen every time, so it is definitely hard to reproduce. This is a link to our website (product details page): https://fashionlime.bg/jeni/lqtno-sako-260 To reproduce the issue click to the next picture thumbnail (the second one for example). If you can't reproduce it from the first time try to refresh the page a couple of times. If you can't reproduce it again you can try to change the color of the product. This is the select list with the colors of the product: https://drive.google.com/file/d/0B-zbpkUSOG-gOVVER21BaEdXbGM/view?usp=sharing Try to change its value. When the user changing it from the java script code we do: $('.sp-thumbs').find('a[href="' + picture.url + '"]').click(); Where the picture.url is the first picture from this newly selected color. I use Chrome 57 on Mac OS and the issue reproduces one of every 5 times approximately when I browse among different products. I will be happy to provide you any further information if needed. Thanks again!

kthornbloom commented 7 years ago

Thanks @goodcode. I was able to see the jump happening on your website once or twice. If it jumped to the top, I could understand, but since it jumps downward, I'm not sure what could cause that. There is no code in my plugin that scrolls the page.

I'm also not able to replicate it using my own demo files. Could there be some other plugin/code that might be affecting things? If you run smooth products by its self with just some filler content for height, do you still have the issue?

chupakasmgn commented 7 years ago

Maybe some code in js of bootstrap framework affecting on this.

ats3v commented 7 years ago

@chupakasmgn are you using Bootstrap in your project as well? The other thing that can probably affect this is Rails turbolinks feature. But I tried to turn it off and the bug still persists. I don't think I use anything else specific that can affect this.