Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from pure document.body for badge flyout Firefox compatibility. #226

Merged
merged 2 commits into from
Oct 22, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
document.documentElement is no more cross-browser than .body. Switchi…
…ng to window.scrollY, with a fallback to docbody for IE.
  • Loading branch information
Eric Gideon committed Aug 13, 2016
commit 310f6d046373cbe6e27b3a6cb65f5f990b46a721
4 changes: 2 additions & 2 deletions lib/assets/badge.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@
var iframePos = iframe.getBoundingClientRect()
var divHeight = divPos.height + arrowHeight

var st = document.documentElement.scrollTop
var sl = document.documentElement.scrollLeft
var st = window.scrollY || document.body.scrollTop
var sl = window.scrollX || document.body.scrollLeft
var iw = window.innerWidth
var ih = window.innerHeight
var iframeTop = iframePos.top + st
Expand Down