Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Commit

Permalink
Fix sidebar auto-height on old Firefox versions
Browse files Browse the repository at this point in the history
Fixes #1410
  • Loading branch information
Edmundo Alvarez committed Jun 4, 2015
1 parent 6a24c26 commit 1c67964
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions javascript/src/components/search/SearchSidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ var SearchSidebar = React.createClass({
});
$sidebarAffix.on('affixed-top.bs.affix', () => {
$(window).on('scroll', this._updateHeight);
this._updateHeight();
});
},
componentWillUnmount() {
Expand Down Expand Up @@ -111,8 +112,8 @@ var SearchSidebar = React.createClass({
var sidebar = React.findDOMNode(this.refs.sidebar);
var sidebarTop = sidebar.getBoundingClientRect().top;
var sidebarCss = window.getComputedStyle(React.findDOMNode(this.refs.sidebar));
var sidebarPaddingTop = parseFloat(sidebarCss['padding-top']);
var sidebarPaddingBottom = parseFloat(sidebarCss['padding-bottom']);
var sidebarPaddingTop = parseFloat(sidebarCss.getPropertyValue('padding-top'));
var sidebarPaddingBottom = parseFloat(sidebarCss.getPropertyValue('padding-bottom'));

var viewPortHeight = window.innerHeight;
var maxHeight =
Expand Down

0 comments on commit 1c67964

Please sign in to comment.