Permalink
Browse files

Fixed issue with iFrame and google chrome

In google chrome, when calling from within an iFrame, the 2 numeric values were getting concatenated instead of added. I wrapped them in "parseFloat" so they are always added.
  • Loading branch information...
1 parent d743b36 commit 2c229ab6d432c94cbb99a47ebe0b6b210fb0d0dd @chriskooken chriskooken committed Aug 19, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/jquery.simplemodal.js
@@ -597,7 +597,7 @@
st = s.d.container.css('position') !== 'fixed' ? wndw.scrollTop() : 0;
if (s.o.position && Object.prototype.toString.call(s.o.position) === '[object Array]') {
- top = st + (s.o.position[0] || hc);
+ top = parseFloat(st) + parseFloat(s.o.position[0] || hc);
left = s.o.position[1] || vc;
} else {
top = st + hc;

0 comments on commit 2c229ab

Please sign in to comment.