WebSlides icon indicating copy to clipboard operation
WebSlides copied to clipboard

Scrolling slide index is breaking target slide

Open ThomasJanotta opened this issue 5 years ago • 3 comments

Hi, great slides, works well in mobile devices :-) I found a bug, wonder why no one else sees it. in IE10/Edge and Firefox (en/de) from 30+, but not in chrome 73.0.3683.86 on desktop (laptop) windows 7/10)) When you open the slides index and scroll down, e.g. 2. or 3. row, and click, then the target slide is also displaced up to this scoll amount. Even reload does not fix this. It is reproducable in the components.html too.

slide

ThomasJanotta avatar Apr 08 '19 06:04 ThomasJanotta

In order to keep the position of the actual webslide during the selection of a slide via the slide index (otherwise the actual slide moves while scrolling down the index) the following additions are required: Find #webslides (line 400 (or so if already edited)) in webslides.css and add:

position: fixed; top: 0; left: 0; width: 100%; height: 100%;

I'm working with Firefox only and I hope this helps for any other browsers.

fkworks avatar Nov 21 '19 10:11 fkworks

Intially, the body element has a height of 100% and has overflow set to hidden. By doing this, scrolling is not possible. When showing the slide index, the body is set to be scrollable, but the height is still 100%.

The problem here, when showing a particular slide, is that Firefox does not reset the body to its original position. Instead, it is moved upwards, but it still has a 100% height and it is not possible to scroll it back into view.

I solved this by adding position: absolute to the body element. In my opinion, this is the easiest solution. This also works in Chrome and Edge.

If I have time, I can try to create a pull request to solve this. I think that issue #143 has the same cause as this one.

rvaandrager avatar Oct 12 '20 13:10 rvaandrager

Thanks, position:absolute on the body works, I added it to a separate CSS.