Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

dateinput, tooltip and validator error messages now position correctl…

…y on iPad. native jQuery offset() method returns incorrect value on iPad.
  • Loading branch information...
commit 5926ae9d167e120ae26e18e7c5644869723c765d 1 parent b780ebb
@tipiirai tipiirai authored
View
5 src/dateinput/dateinput.js
@@ -431,6 +431,11 @@
// show calendar
var pos = input.offset();
+ // iPad position fix
+ if (/iPad/i.test(navigator.userAgent)) {
+ pos.top -= $(window).scrollTop();
+ }
+
root.css({
top: pos.top + input.outerHeight({margins: true}) + conf.offset[0],
left: pos.left + conf.offset[1]
View
5 src/tooltip/tooltip.js
@@ -89,6 +89,11 @@
top -= tip.outerHeight() - conf.offset[0];
left += trigger.outerWidth() + conf.offset[1];
+ // iPad position fix
+ if (/iPad/i.test(navigator.userAgent)) {
+ top -= $(window).scrollTop();
+ }
+
// adjust Y
var height = tip.outerHeight() + trigger.outerHeight();
if (pos == 'center') { top += height / 2; }
View
6 src/validator/validator.js
@@ -107,6 +107,12 @@
top -= el.outerHeight() - conf.offset[0];
left += trigger.outerWidth() + conf.offset[1];
+
+ // iPad position fix
+ if (/iPad/i.test(navigator.userAgent)) {
+ top -= $(window).scrollTop();
+ }
+
// adjust Y
var height = el.outerHeight() + trigger.outerHeight();
if (y == 'center') { top += height / 2; }
Please sign in to comment.
Something went wrong with that request. Please try again.