Skip to content

Commit 40932d7

Browse files
chore(): sync main into next (#30277)
2 parents a0fa3b3 + 7713cbe commit 40932d7

27 files changed

+405
-220
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [8.5.1](https://github.com/ionic-team/ionic-framework/compare/v8.5.0...v8.5.1) (2025-03-19)
7+
8+
9+
### Bug Fixes
10+
11+
* **modal:** consider scrollable content while dragging when expandToScroll is false ([#30257](https://github.com/ionic-team/ionic-framework/issues/30257)) ([68be8e9](https://github.com/ionic-team/ionic-framework/commit/68be8e915ce5637b20591bb0acfb3653c2184ff6))
12+
* **vue:** update output target and fix incorrect types ([#30259](https://github.com/ionic-team/ionic-framework/issues/30259)) ([f4186c6](https://github.com/ionic-team/ionic-framework/commit/f4186c6761c46bf386f8effecf90d88831c34726)), closes [#30254](https://github.com/ionic-team/ionic-framework/issues/30254)
13+
14+
15+
### Performance Improvements
16+
17+
* **modal:** fixing performance regression on modal sheets when expandToScroll is false ([#30267](https://github.com/ionic-team/ionic-framework/issues/30267)) ([c4b9212](https://github.com/ionic-team/ionic-framework/commit/c4b92126405ae5b7160ce03f40557563e755a8a5))
18+
19+
20+
21+
22+
23+
## [8.4.6](https://github.com/ionic-team/ionic-framework/compare/v8.4.5...v8.4.6) (2025-03-19)
24+
25+
26+
### Bug Fixes
27+
28+
* **vue:** update output target and fix incorrect types ([#30259](https://github.com/ionic-team/ionic-framework/issues/30259)) ([0eaee78](https://github.com/ionic-team/ionic-framework/commit/0eaee78fe1cae8f8a6cb04a01abad8c05dec0723)), closes [#30254](https://github.com/ionic-team/ionic-framework/issues/30254)
29+
30+
31+
32+
33+
634
# [8.5.0](https://github.com/ionic-team/ionic-framework/compare/v8.4.5...v8.5.0) (2025-03-13)
735

836

core/CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [8.5.1](https://github.com/ionic-team/ionic-framework/compare/v8.5.0...v8.5.1) (2025-03-19)
7+
8+
9+
### Bug Fixes
10+
11+
* **modal:** consider scrollable content while dragging when expandToScroll is false ([#30257](https://github.com/ionic-team/ionic-framework/issues/30257)) ([68be8e9](https://github.com/ionic-team/ionic-framework/commit/68be8e915ce5637b20591bb0acfb3653c2184ff6))
12+
* **vue:** update output target and fix incorrect types ([#30259](https://github.com/ionic-team/ionic-framework/issues/30259)) ([f4186c6](https://github.com/ionic-team/ionic-framework/commit/f4186c6761c46bf386f8effecf90d88831c34726)), closes [#30254](https://github.com/ionic-team/ionic-framework/issues/30254)
13+
14+
15+
### Performance Improvements
16+
17+
* **modal:** fixing performance regression on modal sheets when expandToScroll is false ([#30267](https://github.com/ionic-team/ionic-framework/issues/30267)) ([c4b9212](https://github.com/ionic-team/ionic-framework/commit/c4b92126405ae5b7160ce03f40557563e755a8a5))
18+
19+
20+
21+
22+
23+
## [8.4.6](https://github.com/ionic-team/ionic-framework/compare/v8.4.5...v8.4.6) (2025-03-19)
24+
25+
26+
### Bug Fixes
27+
28+
* **vue:** update output target and fix incorrect types ([#30259](https://github.com/ionic-team/ionic-framework/issues/30259)) ([0eaee78](https://github.com/ionic-team/ionic-framework/commit/0eaee78fe1cae8f8a6cb04a01abad8c05dec0723)), closes [#30254](https://github.com/ionic-team/ionic-framework/issues/30254)
29+
30+
31+
32+
33+
634
# [8.5.0](https://github.com/ionic-team/ionic-framework/compare/v8.4.5...v8.5.0) (2025-03-13)
735

836

core/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ionic/core",
3-
"version": "8.5.0",
3+
"version": "8.5.1",
44
"description": "Base components for Ionic",
55
"keywords": [
66
"ionic",

core/src/components/modal/gestures/sheet.ts

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { isIonContent, findClosestIonContent } from '@utils/content';
1+
import { findClosestIonContent, isIonContent } from '@utils/content';
22
import { createGesture } from '@utils/gesture';
3-
import { clamp, raf, getElementRoot } from '@utils/helpers';
3+
import { clamp, getElementRoot, raf } from '@utils/helpers';
44
import { FOCUS_TRAP_DISABLE_CLASS } from '@utils/overlays';
55

66
import type { Animation } from '../../../interface';
@@ -84,6 +84,7 @@ export const createSheetGesture = (
8484
let currentBreakpoint = initialBreakpoint;
8585
let offset = 0;
8686
let canDismissBlocksGesture = false;
87+
let cachedScrollEl: HTMLElement | null = null;
8788
const canDismissMaxStep = 0.95;
8889
const maxBreakpoint = breakpoints[breakpoints.length - 1];
8990
const minBreakpoint = breakpoints[0];
@@ -234,6 +235,17 @@ export const createSheetGesture = (
234235
*/
235236
canDismissBlocksGesture = baseEl.canDismiss !== undefined && baseEl.canDismiss !== true && minBreakpoint === 0;
236237

238+
/**
239+
* Cache the scroll element reference when the gesture starts,
240+
* this allows us to avoid querying the DOM for the target in onMove,
241+
* which would impact performance significantly.
242+
*/
243+
if (!expandToScroll) {
244+
const targetEl = findClosestIonContent(detail.event.target! as HTMLElement);
245+
cachedScrollEl =
246+
targetEl && isIonContent(targetEl) ? getElementRoot(targetEl).querySelector('.inner-scroll') : targetEl;
247+
}
248+
237249
/**
238250
* If expandToScroll is disabled, we need to swap
239251
* the footer visibility to the original, so if the modal
@@ -268,13 +280,8 @@ export const createSheetGesture = (
268280
* If `expandToScroll` is disabled, and an upwards swipe gesture is done within
269281
* the scrollable content, we should not allow the swipe gesture to continue.
270282
*/
271-
if (!expandToScroll && detail.deltaY <= 0) {
272-
const contentEl = findClosestIonContent(detail.event.target! as HTMLElement);
273-
const scrollEl =
274-
contentEl && isIonContent(contentEl) ? getElementRoot(contentEl).querySelector('.inner-scroll') : contentEl;
275-
if (scrollEl) {
276-
return;
277-
}
283+
if (!expandToScroll && detail.deltaY <= 0 && cachedScrollEl) {
284+
return;
278285
}
279286

280287
/**
@@ -335,12 +342,8 @@ export const createSheetGesture = (
335342
* function to be called if the user is trying to swipe content upwards and the content
336343
* is not scrolled to the top.
337344
*/
338-
if (!expandToScroll && detail.deltaY <= 0 && findClosestIonContent(detail.event.target! as HTMLElement)) {
339-
const contentEl = findClosestIonContent(detail.event.target! as HTMLElement)!;
340-
const scrollEl = isIonContent(contentEl) ? getElementRoot(contentEl).querySelector('.inner-scroll') : contentEl;
341-
if (scrollEl!.scrollTop > 0) {
342-
return;
343-
}
345+
if (!expandToScroll && detail.deltaY <= 0 && cachedScrollEl && cachedScrollEl.scrollTop > 0) {
346+
return;
344347
}
345348

346349
/**

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"core",
44
"packages/*"
55
],
6-
"version": "8.5.0"
6+
"version": "8.5.1"
77
}

packages/angular-server/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [8.5.1](https://github.com/ionic-team/ionic-framework/compare/v8.5.0...v8.5.1) (2025-03-19)
7+
8+
**Note:** Version bump only for package @ionic/angular-server
9+
10+
11+
12+
13+
14+
## [8.4.6](https://github.com/ionic-team/ionic-framework/compare/v8.4.5...v8.4.6) (2025-03-19)
15+
16+
**Note:** Version bump only for package @ionic/angular-server
17+
18+
19+
20+
21+
622
# [8.5.0](https://github.com/ionic-team/ionic-framework/compare/v8.4.5...v8.5.0) (2025-03-13)
723

824
**Note:** Version bump only for package @ionic/angular-server

packages/angular-server/package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/angular-server/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ionic/angular-server",
3-
"version": "8.5.0",
3+
"version": "8.5.1",
44
"description": "Angular SSR Module for Ionic",
55
"keywords": [
66
"ionic",
@@ -62,6 +62,6 @@
6262
},
6363
"prettier": "@ionic/prettier-config",
6464
"dependencies": {
65-
"@ionic/core": "^8.5.0"
65+
"@ionic/core": "^8.5.1"
6666
}
6767
}

packages/angular/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [8.5.1](https://github.com/ionic-team/ionic-framework/compare/v8.5.0...v8.5.1) (2025-03-19)
7+
8+
**Note:** Version bump only for package @ionic/angular
9+
10+
11+
12+
13+
14+
## [8.4.6](https://github.com/ionic-team/ionic-framework/compare/v8.4.5...v8.4.6) (2025-03-19)
15+
16+
**Note:** Version bump only for package @ionic/angular
17+
18+
19+
20+
21+
622
# [8.5.0](https://github.com/ionic-team/ionic-framework/compare/v8.4.5...v8.5.0) (2025-03-13)
723

824

0 commit comments

Comments
 (0)