فهرست منبع

Position fixed in iOS5 devices

@soyjavi 14 سال پیش
والد
کامیت
125571711d
1فایلهای تغییر یافته به همراه13 افزوده شده و 0 حذف شده
  1. 13 0
      src/boot/Lungo.Boot.Section.js

+ 13 - 0
src/boot/Lungo.Boot.Section.js

@@ -42,6 +42,11 @@ LUNGO.Boot.Section = (function(lng, undefined) {
     };
 
     var _initAllSections = function(sections) {
+
+        if (lng.Core.isMobile()) {
+            _setPositionFixedInIOS5(sections);
+        }
+
         for (var i = 0, len = sections.length; i < len; i++) {
             var section = lng.dom(sections[i]);
             _initFirstArticle(section);
@@ -56,6 +61,14 @@ LUNGO.Boot.Section = (function(lng, undefined) {
         lng.dom('aside').addClass('show');
     };
 
+    var _setPositionFixedInIOS5 = function(sections) {
+        var environment = lng.Core.environment();
+
+        if (environment.os.name === 'ios' && environment.os.version >= '5.') {
+            sections.style('position', 'fixed');
+        }
+    }
+
     return {
         start: start
     };