Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better testing for innerHeight existence

  • Loading branch information...
commit 869ade82b4b371dbd59d9c33274de3f02b85b5e3 1 parent 55ea15e
Matt Shapiro authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/jquery.simplemodal.js
View
4 src/jquery.simplemodal.js
@@ -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()];
Please sign in to comment.
Something went wrong with that request. Please try again.