Skip to content

Commit

Permalink
better testing for innerHeight existence
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Shapiro committed Dec 19, 2011
1 parent 55ea15e commit 869ade8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jquery.simplemodal.js
Expand Up @@ -492,9 +492,9 @@
}, 10);
},
getDimensions: function () {
// fix a jQuery/Opera bug with determining the window height
// fix a jQuery bug with determining the window height - use innerHeight if available
var s = this,
h = wndw[0].innerHeight ? wndw[0].innerHeight : wndw.height();
h = typeof window.innerHeight == 'undefined' ? wndw.height() : window.innerHeight;

d = [doc.height(), doc.width()];
w = [h, wndw.width()];
Expand Down

0 comments on commit 869ade8

Please sign in to comment.