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

Bug Fix: Window location was changed only in Safari when arrows or thumbnails were clicked(#10).

NaotoshiFujita 5 éve
szülő
commit
df473fd358

+ 8 - 0
dist/js/splide.js

@@ -1225,6 +1225,7 @@ var FADE = 'fade';
  * @copyright Naotoshi Fujita. All rights reserved.
  */
 
+
 /**
  * The component for fade transition.
  *
@@ -1258,8 +1259,15 @@ var FADE = 'fade';
      * @param {function}  done      - Callback function must be invoked when transition is completed.
      */
     start: function start(destIndex, newIndex, prevIndex, coord, done) {
+      var track = Components.Elements.track;
+      applyStyle(track, {
+        height: unit(track.clientHeight)
+      });
       apply(newIndex);
       done();
+      applyStyle(track, {
+        height: ''
+      });
     }
   };
   /**

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


BIN
dist/js/splide.min.js.gz


+ 1 - 1
package-lock.json

@@ -1,6 +1,6 @@
 {
   "name": "@splidejs/splide",
-  "version": "2.2.0",
+  "version": "2.2.1",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {

+ 1 - 1
package.json

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

+ 7 - 0
src/js/transitions/fade/index.js

@@ -6,6 +6,7 @@
  */
 
 import { applyStyle } from '../../utils/dom';
+import { unit } from "../../utils/utils";
 
 
 /**
@@ -40,8 +41,14 @@ export default ( Splide, Components ) => {
 		 * @param {function}  done      - Callback function must be invoked when transition is completed.
 		 */
 		start( destIndex, newIndex, prevIndex, coord, done ) {
+			const track = Components.Elements.track;
+
+			applyStyle( track, { height: unit( track.clientHeight ) } );
+
 			apply( newIndex );
 			done();
+
+			applyStyle( track, { height: '' } );
 		},
 	};
 

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