Skip to content

Commit

Permalink
Fix function getScrollbarWidth
Browse files Browse the repository at this point in the history
$(document.body).height() gets the same height as $(window).height() in some cases (for example if you use the foundation framework, because it sets the body height to 100%).
Change $(document.body).height() to $(document).height() works fine.
  • Loading branch information
pesrepus authored Sep 16, 2016
1 parent 97ab85f commit d08ac32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/remodal.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
* @returns {Number}
*/
function getScrollbarWidth() {
if ($(document.body).height() <= $(window).height()) {
if ($(document).height() <= $(window).height()) {
return 0;
}

Expand Down

0 comments on commit d08ac32

Please sign in to comment.