userAgent Air iPad and new ipad

Update for new IOS compatibility
userAgent is now : Safari not ipad
pull/3983/head
DamienLyon 4 years ago committed by GitHub
parent aaceb68cb4
commit 790eefd5f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      main/template/default/learnpath/view.tpl

@ -231,13 +231,15 @@
$('.menu-button').css('color', '#000');
}
});
if (/iPhone|iPod|iPad/.test(navigator.userAgent)) {
if (/iPhone|iPod|iPad|Safari/.test(navigator.userAgent)) {
// Fix an issue where you cannot scroll below first screen in
// learning paths on Apple devices
document.getElementById('wrapper-iframe').setAttribute(
'style',
'width:100%; overflow:auto; position:auto; -webkit-overflow-scrolling:touch !important;'
);
$('#wrapper-iframe').before('<a style="position:fixed;right:5px;top:5px;z-index:1001;" target="_blank" href="{{ iframe_src }}" >Open PDF on Safari</a>');
// Fix another issue whereby buttons do not react to click below
// second screen in learning paths on Apple devices
document.getElementById('content_id').setAttribute('style', 'overflow: auto;');

Loading…
Cancel
Save