Height should take into account padding-top and padding-bottom#21
Height should take into account padding-top and padding-bottom#21francescom wants to merge 3 commits intolazd:masterfrom
Conversation
To check if element is at bottom, the element height must take into account margin-top and margin-bottom. Otherwise it doesn't work if element has padding (not sure about margins)
Height must take into account padding
|
Nice find! Can you include an example of this failing so I can test it against the new code and old code? Unfortunately we don't have automated tests in iNoBounce, so we need to poke at it and make sure it does what we expect it to, so examples help. |
|
Yes, I can revert the code already patched to the previous state for some time (but not for long). You can test here: Drag the text up till it reaches the end. Then drag again and it will catch the whole page and overscroll (bounce). While if you change the link to the script from
to
it will stop bouncing the page. |
|
Please just provide a file |
|
Site is already modified and is in test/staging area, no problem. |
|
I have added style="padding:64px" to the app.html example. If you drag up to the last line, then leave it. Then drag up again, it will bounce the page. To notice it, you have to look at the top bar. The top bar will get out of the page when you drag, that's the only difference between a correct drag and a full page "bounce". |

When detecting if element is at bottom, the height should take into account padding-top and padding-bottom, otherwise it won't work, and the page will "bounce" when you drag elements with padding (when they are at the bottom scroll position)