BugraDayi
BugraDayi

Reputation: 538

SweetAlert js scrolling the page when alert panel is popped up

I am using sweetalert js but when alert is popped up, page scroll, I tried to position:absolute but not working

Upvotes: 2

Views: 4397

Answers (4)

Giangimgs
Giangimgs

Reputation: 1200

The same issue happened when I clicked on a tag with href='#'. So, if your code is the same, just replace a tag with other tags like span, button...

Upvotes: 0

michal.jakubeczy
michal.jakubeczy

Reputation: 9489

Add this CSS to your stylesheets:

html.swal2-shown,body.swal2-shown { overflow-y: hidden !important; height: auto!important;}

Upvotes: 0

Saran
Saran

Reputation: 1575

Or Try to set overflow: hidden; Both X and Y

Upvotes: 0

SaMeEr
SaMeEr

Reputation: 381

Try setting the css property to:

overlay:none;

Upvotes: 0

Related Questions