Forráskód Böngészése

Bug Fix: Must consider an event bubbling for transitionend.

NaotoshiFujita 5 éve
szülő
commit
69611e203f
3 módosított fájl, 7 hozzáadás és 5 törlés
  1. 1 1
      dist/js/splide.min.js
  2. 1 1
      package.json
  3. 5 3
      src/js/transitions/slide/index.js

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 1
dist/js/splide.min.js


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "@splidejs/splide",
-  "version": "1.0.1",
+  "version": "1.0.2",
   "description": "Splide is a lightweight and powerful slider without any dependencies.",
   "author": "Naotoshi Fujita",
   "license": "MIT",

+ 5 - 3
src/js/transitions/slide/index.js

@@ -30,9 +30,11 @@ export default ( Splide, Components ) => {
 			const list    = Components.Elements.list;
 			const options = Splide.options;
 
-			const removers = subscribe( list, 'transitionend', () => {
-				onEnd();
-				removers[0]();
+			const removers = subscribe( list, 'transitionend', e => {
+				if ( e.target === list ) {
+					onEnd();
+					removers[0]();
+				}
 			} );
 
 			applyStyle( list, {

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott