I just want to ask how I can stop page to scroll on top everytime when alert is fire, I am using SweetAlert2. I thought maybe my component is rerendering but thats not an issu. Okay for information, i have tried backdrop: false and it is removing overflow-y and background css, also I have tried heightAuto: false and there is no change in it I tried preventDefault() too, but that does not work too Thanks in advance.
Asked
Active
Viewed 270 times
1
-
Have you use any this kind of code like window.scrollIntoView() ? – Mayur Kukadiya Jul 07 '21 at 11:57
-
1Have you tried this's answer ? https://stackoverflow.com/questions/46135063/how-can-i-stop-sweetalert-scrolling-to-top-after-clicking-ok – Mayur Kukadiya Jul 07 '21 at 11:59
-
@mayurkukadiya yes I tried and tested but nothing works as I already mentioned – user16398638 Jul 07 '21 at 12:07
-
1And no I have'nt use any window.scrollIntoView – user16398638 Jul 07 '21 at 12:07
-
Can you create a working example (using codesnadbox or something)? – Mosh Feu Jul 07 '21 at 13:59
-
Hi. Welcome to the community. Please can you provide your code in order to reproduce the issue? – Òscar Raya Jul 07 '21 at 14:05