Browse Source

fix the bug of Notification

imyelo 12 năm trước cách đây
mục cha
commit
bb89fcc5d1
1 tập tin đã thay đổi với 8 bổ sung3 xóa
  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
 
 
   ###