Skip to content

Commit

Permalink
Fixes #704 - Round the scroll properties
Browse files Browse the repository at this point in the history
Chromium based browsers return float for `scrollTop` and this seems to break `isComponentScrollBarAtBottom` method.

(cherry picked from commit 7b5704f)
  • Loading branch information
martin-g committed Feb 9, 2021
1 parent c5a5376 commit 485ab2a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ var QuickView = {
// offsetheight : element height
// scrolltop : height of scroll from top
// scroll-height:height of the scroll view of an element
return ($(el).prop("offsetHeight") + $(el).scrollTop() >= $(el).prop("scrollHeight"));
return (Math.round($(el).prop("offsetHeight")) + Math.round($(el).scrollTop()) >= Math.round($(el).prop("scrollHeight")));
},
/**
returns true if the scrollbar of the page is moved at the bottom else it returns false
Expand Down

0 comments on commit 485ab2a

Please sign in to comment.