Ver código fonte

prevented unexpected transitions

Muzaffer Dede 5 anos atrás
pai
commit
c1be1e5598
3 arquivos alterados com 12 adições e 3 exclusões
  1. 4 1
      dist/alpine-ie11.js
  2. 4 1
      dist/alpine.js
  3. 4 1
      src/directives/show.js

+ 4 - 1
dist/alpine-ie11.js

@@ -6277,6 +6277,9 @@
     }.bind(this);
 
     if (initialUpdate === true) {
+      // Asign current value to el to check later on for preventing transition overlaps
+      el.__x_transition_last_value = value;
+
       if (value) {
         show();
       } else {
@@ -6318,7 +6321,7 @@
             _newArrowCheck(this, _this2);
           }.bind(this));
         }
-      } // Asign current value to el to check later on for preventing transition overlaps
+      } // Asign current value to el
 
 
       el.__x_transition_last_value = value;

+ 4 - 1
dist/alpine.js

@@ -672,6 +672,9 @@
     };
 
     if (initialUpdate === true) {
+      // Asign current value to el to check later on for preventing transition overlaps
+      el.__x_transition_last_value = value;
+
       if (value) {
         show();
       } else {
@@ -697,7 +700,7 @@
         } else {
           resolve(() => {});
         }
-      } // Asign current value to el to check later on for preventing transition overlaps
+      } // Asign current value to el
 
 
       el.__x_transition_last_value = value;

+ 4 - 1
src/directives/show.js

@@ -19,6 +19,9 @@ export function handleShowDirective(component, el, value, modifiers, initialUpda
     }
 
     if (initialUpdate === true) {
+        // Asign current value to el to check later on for preventing transition overlaps
+        el.__x_transition_last_value = value
+
         if (value) {
             show()
         } else {
@@ -45,7 +48,7 @@ export function handleShowDirective(component, el, value, modifiers, initialUpda
             }
         }
 
-        // Asign current value to el to check later on for preventing transition overlaps
+        // Asign current value to el
         el.__x_transition_last_value = value
     }