From fe21fcfc1e7536aec4175d66ea80db760792e595 Mon Sep 17 00:00:00 2001 From: Vladimir Kharlampidi Date: Mon, 23 Oct 2023 15:30:45 +0300 Subject: [PATCH 1/3] add changelog --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a609f5ff..a70799d8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +# 11.0.0-beta.1 + +### Bug Fixes + +- **autoplay:** fix negative autoplay values after stop/start, fix autoplay with free mode ([8bef84d](https://github.com/nolimits4web/Swiper/commit/8bef84d68c44b93757585cb037f7448cc99f7c71)), closes [#7084](https://github.com/nolimits4web/Swiper/issues/7084) +- **autoplay:** fix pauseOnPointerEnter if hovered during transition ([5080d95](https://github.com/nolimits4web/Swiper/commit/5080d9569fc1ac77c0cb01812567f8035cc780bb)), closes [#7107](https://github.com/nolimits4web/Swiper/issues/7107) +- **core:** remove grid class on rows change ([2f65e89](https://github.com/nolimits4web/Swiper/commit/2f65e89cb5758b44ceced212d4be905e0ed0f4c3)), closes [#7053](https://github.com/nolimits4web/Swiper/issues/7053) +- **element:** correctly respond to object params assignment ([f23c742](https://github.com/nolimits4web/Swiper/commit/f23c74250c7d4fd56ea4d5abfe2e031504c86d91)) +- **scrollbar:** allow multiple classes in scrollbar parameters ([89a6f71](https://github.com/nolimits4web/Swiper/commit/89a6f7192f7da120487c224dc1b1a7668422321a)), closes [#7096](https://github.com/nolimits4web/Swiper/issues/7096) + +### Features + +- **core:** add fully visible slides classes ([902a4c4](https://github.com/nolimits4web/Swiper/commit/902a4c4adbff3af1188427d6cfef50d537c1bcef)), closes [#6773](https://github.com/nolimits4web/Swiper/issues/6773) +- **core:** add handling for native touch events ([74bb1cc](https://github.com/nolimits4web/Swiper/commit/74bb1ccf4c6f31ffdb7419d5a58a4f592aa6006b)), closes [#6478](https://github.com/nolimits4web/Swiper/issues/6478) [#6381](https://github.com/nolimits4web/Swiper/issues/6381) [#6897](https://github.com/nolimits4web/Swiper/issues/6897) +- **core:** loop support for grid, new `loopAddBlankSlides` parameter ([b5db223](https://github.com/nolimits4web/Swiper/commit/b5db22392f6c6609de292c00d163f9230d0925ee)) +- **core:** remove `loopedSlides` parameter, add `loopAdditionalSlides` parameter ([d647985](https://github.com/nolimits4web/Swiper/commit/d647985faa9c8e3d551270e96692b2bd135bc92a)) +- **core:** reworked loop mode ([2a99dbd](https://github.com/nolimits4web/Swiper/commit/2a99dbd383ca6880dd60ce35c70d7337bb1f38c8)) +- **core:** update loop mode logic and lowered requirements ([703ede6](https://github.com/nolimits4web/Swiper/commit/703ede6ea1e490ee0200edf18c6857f534101827)) +- **element:** make`eventPrefix` parameter default to `swiper` ([88d463a](https://github.com/nolimits4web/Swiper/commit/88d463aef9b74e6de637470c4c7c024e5f3ca6b9)) +- **core:** move default container overflow back to `hidden` ([88941a8](https://github.com/nolimits4web/Swiper/commit/88941a82491b289faed24508db8b90e3c5506ba1)) + # [10.3.1](https://github.com/nolimits4web/Swiper/compare/v10.3.0...v10.3.1) (2023-09-28) ### Bug Fixes From 526e61df2018d70ad33904aaf251308dd21afb06 Mon Sep 17 00:00:00 2001 From: Vladimir Kharlampidi Date: Mon, 23 Oct 2023 15:31:06 +0300 Subject: [PATCH 2/3] 11.0.0-beta.2 --- package-lock.json | 4 ++-- package.json | 2 +- src/copy/package.json | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 17c2fcac6..76060efbe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "swiper-src", - "version": "11.0.0-beta.1", + "version": "11.0.0-beta.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "swiper-src", - "version": "11.0.0-beta.1", + "version": "11.0.0-beta.2", "funding": [ { "type": "patreon", diff --git a/package.json b/package.json index 06092c7ef..f4da57957 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swiper-src", - "version": "11.0.0-beta.1", + "version": "11.0.0-beta.2", "description": "Most modern mobile touch slider and framework with hardware accelerated transitions", "type": "module", "scripts": { diff --git a/src/copy/package.json b/src/copy/package.json index 3efc5c270..8e714968b 100644 --- a/src/copy/package.json +++ b/src/copy/package.json @@ -1,6 +1,6 @@ { "name": "swiper", - "version": "11.0.0-beta.1", + "version": "11.0.0-beta.2", "description": "Most modern mobile touch slider and framework with hardware accelerated transitions", "typings": "swiper.d.ts", "type": "module", @@ -204,5 +204,5 @@ "engines": { "node": ">= 4.7.0" }, - "releaseDate": "September 20, 2023" + "releaseDate": "October 23, 2023" } From 15d9b15686fb864f292f8cfa0d3218a3caebd434 Mon Sep 17 00:00:00 2001 From: Vladimir Kharlampidi Date: Mon, 23 Oct 2023 16:23:47 +0300 Subject: [PATCH 3/3] fix(core): correctly proceed `touchReleaseOnEdges` with touch events --- src/core/events/index.mjs | 12 +++--------- src/core/events/onDocumentTouchStart.mjs | 8 ++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 src/core/events/onDocumentTouchStart.mjs diff --git a/src/core/events/index.mjs b/src/core/events/index.mjs index 7be218f6a..4cdda8f46 100644 --- a/src/core/events/index.mjs +++ b/src/core/events/index.mjs @@ -7,9 +7,7 @@ import onResize from './onResize.mjs'; import onClick from './onClick.mjs'; import onScroll from './onScroll.mjs'; import onLoad from './onLoad.mjs'; - -let dummyEventAttached = false; -function dummyEventListener() {} +import onDocumentTouchStart from './onDocumentTouchStart.mjs'; const events = (swiper, method) => { const document = getDocument(); @@ -19,6 +17,7 @@ const events = (swiper, method) => { const swiperMethod = method; // Touch Events + document[domMethod]('touchstart', swiper.onDocumentTouchStart, { passive: false, capture }); el[domMethod]('touchstart', swiper.onTouchStart, { passive: false }); el[domMethod]('pointerdown', swiper.onTouchStart, { passive: false }); document[domMethod]('touchmove', swiper.onTouchMove, { passive: false, capture }); @@ -58,12 +57,12 @@ const events = (swiper, method) => { function attachEvents() { const swiper = this; - const document = getDocument(); const { params } = swiper; swiper.onTouchStart = onTouchStart.bind(swiper); swiper.onTouchMove = onTouchMove.bind(swiper); swiper.onTouchEnd = onTouchEnd.bind(swiper); + swiper.onDocumentTouchStart = onDocumentTouchStart.bind(swiper); if (params.cssMode) { swiper.onScroll = onScroll.bind(swiper); @@ -72,11 +71,6 @@ function attachEvents() { swiper.onClick = onClick.bind(swiper); swiper.onLoad = onLoad.bind(swiper); - if (!dummyEventAttached) { - document.addEventListener('touchstart', dummyEventListener); - dummyEventAttached = true; - } - events(swiper, 'on'); } diff --git a/src/core/events/onDocumentTouchStart.mjs b/src/core/events/onDocumentTouchStart.mjs new file mode 100644 index 000000000..6b291b2b8 --- /dev/null +++ b/src/core/events/onDocumentTouchStart.mjs @@ -0,0 +1,8 @@ +export default function onDocumentTouchStart() { + const swiper = this; + if (swiper.documentTouchHandlerProceeded) return; + swiper.documentTouchHandlerProceeded = true; + if (swiper.params.touchReleaseOnEdges) { + swiper.el.style.touchAction = 'auto'; + } +}