Skip to content

Commit df473fd

Browse files
Bug Fix: Window location was changed only in Safari when arrows or thumbnails were clicked(#10).
1 parent 536dc5b commit df473fd

File tree

6 files changed

+18
-3
lines changed

6 files changed

+18
-3
lines changed

dist/js/splide.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1225,6 +1225,7 @@ var FADE = 'fade';
12251225
* @copyright Naotoshi Fujita. All rights reserved.
12261226
*/
12271227

1228+
12281229
/**
12291230
* The component for fade transition.
12301231
*
@@ -1258,8 +1259,15 @@ var FADE = 'fade';
12581259
* @param {function} done - Callback function must be invoked when transition is completed.
12591260
*/
12601261
start: function start(destIndex, newIndex, prevIndex, coord, done) {
1262+
var track = Components.Elements.track;
1263+
applyStyle(track, {
1264+
height: unit(track.clientHeight)
1265+
});
12611266
apply(newIndex);
12621267
done();
1268+
applyStyle(track, {
1269+
height: ''
1270+
});
12631271
}
12641272
};
12651273
/**

dist/js/splide.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/splide.min.js.gz

24 Bytes
Binary file not shown.

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@splidejs/splide",
3-
"version": "2.2.0",
3+
"version": "2.2.1",
44
"description": "Splide is a lightweight and powerful slider without any dependencies.",
55
"author": "Naotoshi Fujita",
66
"license": "MIT",

src/js/transitions/fade/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
import { applyStyle } from '../../utils/dom';
9+
import { unit } from "../../utils/utils";
910

1011

1112
/**
@@ -40,8 +41,14 @@ export default ( Splide, Components ) => {
4041
* @param {function} done - Callback function must be invoked when transition is completed.
4142
*/
4243
start( destIndex, newIndex, prevIndex, coord, done ) {
44+
const track = Components.Elements.track;
45+
46+
applyStyle( track, { height: unit( track.clientHeight ) } );
47+
4348
apply( newIndex );
4449
done();
50+
51+
applyStyle( track, { height: '' } );
4552
},
4653
};
4754

0 commit comments

Comments
 (0)