Javi Jimenez Villar il y a 13 ans
Parent
commit
0df6af84a7
2 fichiers modifiés avec 4 ajouts et 5 suppressions
  1. 1 1
      src/boot/Lungo.Boot.Layout.coffee
  2. 3 4
      src/modules/Lungo.Fallback.coffee

+ 1 - 1
src/boot/Lungo.Boot.Layout.coffee

@@ -63,7 +63,7 @@ Lungo.Boot.Layout = do(lng = Lungo) ->
     element[0].addEventListener "touchstart", ((event) ->
       scrollTop = @scrollTop
       @scrollTop = 1  if scrollTop <= 1
-      @scrollTop = @scrollHeight - @offsetHeight - 1  if scrollTop + @offsetHeight >= @scrollHeight
+      @scrollTop = @scrollHeight - @offsetHeight - 1 if scrollTop + @offsetHeight >= @scrollHeight
     ), false
 
   init: init

+ 3 - 4
src/modules/Lungo.Fallback.coffee

@@ -7,11 +7,10 @@
 @author Javier Jimenez Villar <javi@tapquo.com> || @soyjavi
 ###
 Lungo.Fallback = do(lng = Lungo) ->
+
   fixPositionInAndroid = ->
     env = lng.Core.environment()
-    _data "position", (if (env.isMobile and env.os.name is "Android" and env.os.version < "3") then "absolute" else "fixed")
-
-  _data = (key, value) ->
-    lng.dom(document.body).data key, value
+    position = if env.isMobile and env.os.name is "Android" and env.os.version < "3" then "absolute" else "fixed"
+    lng.dom(document.body).data "position", position
 
   fixPositionInAndroid: fixPositionInAndroid