Ver Fonte

Merge pull request #272 from imyelo/fix

a bug of Notification
Javi Jiménez há 12 anos atrás
pai
commit
68ee124100
1 ficheiros alterados com 8 adições e 3 exclusões
  1. 8 3
      src/modules/Lungo.Notification.coffee

+ 8 - 3
src/modules/Lungo.Notification.coffee

@@ -57,10 +57,15 @@ Lungo.Notification = do(lng = Lungo) ->
   @method   hide
   ###
   hide = ->
-    _window.removeClass("show")
+    wait = 0
+    unless _window.hasClass("show")
+      wait = (TRANSITION.DURATION / 2)
     setTimeout (->
-      _el.removeClass("show").removeClass("html").removeClass("confirm").removeClass("notify").removeClass "growl"
-    ), (TRANSITION.DURATION / 2)
+      _window.removeClass("show")
+      setTimeout (->
+        _el.removeClass("show").removeClass("html").removeClass("confirm").removeClass("notify").removeClass "growl"
+      ), (TRANSITION.DURATION / 2)
+    ),  wait
 
 
   ###