Skip to content

Commit

Permalink
Fixed issue with iFrame and google chrome
Browse files Browse the repository at this point in the history
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
chriskooken committed Aug 19, 2014
1 parent d743b36 commit 2c229ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jquery.simplemodal.js
Expand Up @@ -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;
Expand Down

0 comments on commit 2c229ab

Please sign in to comment.