aos icon indicating copy to clipboard operation
aos copied to clipboard

horizontal scroll give me troubles on smartphone size

Open pierrot10 opened this issue 2 years ago • 5 comments

Hi Thanks for that nice tool. I am using it for the first time and it look nice. However, I observed an issue on the smartphone.

The element appear as execpted but I observed that we can scrool the windows from left to right. It's look like the hidden element (before scolling down the windows) are outside of the frame. I mean, the size of the screen. And I beleive, that the reason why we can scrool a bit from right to left or left to right.

Is there is setting to avoid that? I tried to disable the aos with

AOS.init({
    	// Global settings:
		  disable: 'phone',

Without success. I also tried with 'mobile'. But I would like to try to avoid the horizontal scroll even if it's not a lot.

Many thanks

pierrot10 avatar Jan 11 '22 22:01 pierrot10

this work for me :

<script>
    $(function() {
    AOS.init({
        disable: window.innerWidth < 768,
    });
});
</script>

valdruide avatar Feb 01 '22 12:02 valdruide

I've had the same issue (which was pretty hard to pinpoint as no element seems to cross the line by measurements alone). Disabling on mobile is not ideal, but sometimes changing the animation (especially from zoom-out to zoom-in) is a quick fix. Would be great though if AOS didn't mess up the frame size in the first place...

RWitak avatar Feb 27 '22 17:02 RWitak

I have had the same issue on safari all screen sizes. ended up using a different animation.

trevorius avatar Mar 28 '22 19:03 trevorius

I have had the same issue on safari all screen sizes. ended up using a different animation.

can you recommend other animation plugin?

HeinOrangeCollarMedia avatar Nov 04 '22 14:11 HeinOrangeCollarMedia

I have had the same issue on safari all screen sizes. ended up using a different animation.

can you recommend other animation plugin?

I used the same plugin just not the animation that was causing the problem.

trevorius avatar Nov 04 '22 16:11 trevorius