jquery.avgrund.js
jquery.avgrund.js copied to clipboard
Vertical position is wrong if page content is longer than window height
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
Screenshot after the dialog is triggered
as you can clearly see, half the dialog is outside the window.
@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
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?