1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/cordova/ios/orientation.js
2015-11-28 23:32:22 -05:00

23 lines
No EOL
500 B
JavaScript

(function () {
function forceScroll() {
var doc = $(document);
// Try to make it react quicker to the orientation change
doc.scrollTop(doc.scrollTop() + 1);
//$('paper-tabs').filter(':visible').hide().show();
}
function onOrientationChange() {
forceScroll();
for (var i = 0; i <= 500; i += 100) {
setTimeout(forceScroll, i);
}
}
window.addEventListener('orientationchange', onOrientationChange);
})();