Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
campbell-m committed May 31, 2024
1 parent b985050 commit 30ce77b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions web/js/functions.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,17 @@ function base64Decode(string)
return decoder.decode(bytes);
}

<?php
// Fix for iOS 13 where the User Agent string has been changed.
// See https://github.com/flatpickr/flatpickr/issues/1992
?>
function isIos()
{
<?php
// Note that the platform property is deprecated, but is used here
// as a last resort for older browsers. When it is removed from newer
// browsers it will just be undefined and the code should still work.
?>
return (window.navigator.userAgent.match(/iPad/i) ||
window.navigator.userAgent.match(/iPhone/i) ||
/iPad|iPhone|iPod/.test(navigator.platform) ||
Expand Down

0 comments on commit 30ce77b

Please sign in to comment.