Skip to content

Commit

Permalink
fix(Affix): Brower compatible bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Nov 9, 2017
1 parent 805321f commit d8a726d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/affix/Affix.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default class Affix extends Component {
offsetMode.top = typeof offsetTop === 'number';
offsetMode.bottom = typeof offsetBottom === 'number';
}
const { scrollTop, clientHeight, } = document.documentElement;
const { scrollTop, clientHeight, } = window.document.body;
if (rootElm.offsetTop < scrollTop && offsetMode.top) {
// 设置占位高宽
this.setPlaceholderStyle({ ...elemSize })
Expand Down

0 comments on commit d8a726d

Please sign in to comment.