jquery-modal icon indicating copy to clipboard operation
jquery-modal copied to clipboard

Modal activation scrolls page to top automatically

Open ghost opened this issue 4 years ago • 5 comments

The modal link I am trying to use is in the second fold of the page, but every time the modal is activated, the page in the background automatically scrolls to the top of the page. Is there a way I can stop this behavior?

ghost avatar Jun 16 '20 21:06 ghost

I would like to see a solution to this please. I'm sure it's an easy fix!

Blockworx avatar May 06 '21 11:05 Blockworx

I have worked out what is going on with this thanks to this post https://stackoverflow.com/a/54747795

I edited the js, changing this.$body.css("overflow","hidden") to this.$body.css("overflow","unset")

...and it did the trick!

r-hallman avatar Jun 24 '21 10:06 r-hallman

This issue seems fixed in the current version. See the demo

Zenoo avatar Jul 03 '21 10:07 Zenoo

This issue is not fixed, I'm having the scroll top issue.

Fwanz avatar Oct 15 '21 16:10 Fwanz

I have worked out what is going on with this thanks to this post https://stackoverflow.com/a/54747795

I edited the js, changing this.$body.css("overflow","hidden") to this.$body.css("overflow","unset")

...and it did the trick!

Changing if(this.$body=o("body") to if(this.$body=o("html") will be much better.

etekinbas avatar Jan 31 '22 12:01 etekinbas