diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/error_bar.jsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/web/react/components/error_bar.jsx b/web/react/components/error_bar.jsx index 0af1acc6e..a96917d92 100644 --- a/web/react/components/error_bar.jsx +++ b/web/react/components/error_bar.jsx @@ -50,7 +50,9 @@ export default class ErrorBar extends React.Component { $(window).resize(() => { if (this.isValidError(this.state)) { - $('body').css('padding-top', '30px'); + var height = $(React.findDOMNode(this)).outerHeight(); + height = height < 30 ? 30 : height; + $('body').css('padding-top', height + 'px'); } else { $('body').css('padding-top', '0'); } @@ -63,7 +65,9 @@ export default class ErrorBar extends React.Component { componentWillUpdate(nextProps, nextState) { if (this.isValidError(nextState)) { - $('body').css('padding-top', '30px'); + var height = $(React.findDOMNode(this)).outerHeight(); + height = height < 30 ? 30 : height; + $('body').css('padding-top', height + 'px'); } else { $('body').css('padding-top', '0'); } |