Этот коммит содержится в:
=Corey Hulen
2015-10-07 08:37:56 -07:00
родитель 4345dce3b8
Коммит c6c2a97f44

Просмотреть файл

@@ -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');
}