jquery.avgrund.js icon indicating copy to clipboard operation
jquery.avgrund.js copied to clipboard

Vertical position is wrong if page content is longer than window height

Open ptheofan opened this issue 10 years ago • 2 comments

I really liked this plugin! However, testing it's behaviour for bugs on the demo site revealed an issue that prevents me from using it. Please have a look at the screenshots to see the issue.

Screenshot before triggering the dialog screen shot 2014-04-14 at 11 12 36

Screenshot after the dialog is triggered screen shot 2014-04-14 at 11 12 48

as you can clearly see, half the dialog is outside the window.

ptheofan avatar Apr 14 '14 09:04 ptheofan

@ptheofan yes, there is a problem with long content pages due to browser behavior on transformed and positioned elements..

related demo - http://labs.voronianski.com/test/scaled-positioning.html some inputs on previous discussions - https://github.com/voronianski/jquery.avgrund.js/issues/7#issuecomment-13916957

as well as related to https://github.com/voronianski/jquery.avgrund.js/issues/41

voronianski avatar Apr 19 '14 16:04 voronianski

One fix is to remove body {overflow: auto;} in avgrund.css thus:

html {
    height: 100%;
    overflow: auto;
}

body {
    height: 100%;
}

Which I found by searching for why window.scrollTo(0, 0) didn't work. There is an explanation on Stack Overflow at JavaScript scrollTo method does nothing?

Darkicorn avatar May 22 '19 17:05 Darkicorn