fix retrieval of computed styles in ff

This commit is contained in:
Hakim El Hattab 2013-08-17 12:15:55 -04:00
parent 0239302f45
commit 3c5f3ee048
2 changed files with 6 additions and 6 deletions

View file

@ -743,8 +743,8 @@ var Reveal = (function(){
if( typeof sibling.offsetHeight === 'number' && sibling !== element ) { if( typeof sibling.offsetHeight === 'number' && sibling !== element ) {
var styles = window.getComputedStyle( sibling ), var styles = window.getComputedStyle( sibling ),
marginTop = parseInt( styles[ 'margin-top' ], 10 ), marginTop = parseInt( styles.marginTop, 10 ),
marginBottom = parseInt( styles[ 'margin-bottom' ], 10 ); marginBottom = parseInt( styles.marginBottom, 10 );
height -= sibling.offsetHeight + marginTop + marginBottom; height -= sibling.offsetHeight + marginTop + marginBottom;
@ -755,8 +755,8 @@ var Reveal = (function(){
var elementStyles = window.getComputedStyle( element ); var elementStyles = window.getComputedStyle( element );
// Subtract the margins of the target element // Subtract the margins of the target element
height -= parseInt( elementStyles[ 'margin-top' ], 10 ) + height -= parseInt( elementStyles.marginTop, 10 ) +
parseInt( elementStyles[ 'margin-bottom' ], 10 ); parseInt( elementStyles.marginBottom, 10 );
} }

4
js/reveal.min.js vendored

File diff suppressed because one or more lines are too long