Skip to content

Commit 09b2ed0

Browse files
merge release-8.3.2 (#29921)
v8.3.2
2 parents 1c604dc + 78fb1b9 commit 09b2ed0

32 files changed

+192
-95
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
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.3.2](https://github.com/ionic-team/ionic-framework/compare/v8.3.1...v8.3.2) (2024-10-02)
7+
8+
9+
### Bug Fixes
10+
11+
* **segment:** prevent flickering for scrollable on iOS ([#29884](https://github.com/ionic-team/ionic-framework/issues/29884)) ([078ed0b](https://github.com/ionic-team/ionic-framework/commit/078ed0b86a0d8e9f8457481cb739ea214195adce)), closes [#29523](https://github.com/ionic-team/ionic-framework/issues/29523)
12+
13+
14+
15+
16+
617
## [8.3.1](https://github.com/ionic-team/ionic-framework/compare/v8.3.0...v8.3.1) (2024-09-17)
718

819

core/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
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.3.2](https://github.com/ionic-team/ionic-framework/compare/v8.3.1...v8.3.2) (2024-10-02)
7+
8+
9+
### Bug Fixes
10+
11+
* **segment:** prevent flickering for scrollable on iOS ([#29884](https://github.com/ionic-team/ionic-framework/issues/29884)) ([078ed0b](https://github.com/ionic-team/ionic-framework/commit/078ed0b86a0d8e9f8457481cb739ea214195adce)), closes [#29523](https://github.com/ionic-team/ionic-framework/issues/29523)
12+
13+
14+
15+
16+
617
## [8.3.1](https://github.com/ionic-team/ionic-framework/compare/v8.3.0...v8.3.1) (2024-09-17)
718

819

core/api.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ ion-alert,css-prop,--width,ios
143143
ion-alert,css-prop,--width,md
144144

145145
ion-app,none
146+
ion-app,method,setFocus,setFocus(elements: HTMLElement[]) => Promise<void>
146147

147148
ion-avatar,shadow
148149
ion-avatar,css-prop,--border-radius,ios

core/package-lock.json

Lines changed: 2 additions & 2 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.3.1",
3+
"version": "8.3.2",
44
"description": "Base components for Ionic",
55
"keywords": [
66
"ionic",

core/src/components.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,9 @@ export namespace Components {
304304
"trigger": string | undefined;
305305
}
306306
interface IonApp {
307+
/**
308+
* Used to set focus on an element that uses `ion-focusable`. Do not use this if focusing the element as a result of a keyboard event as the focus utility should handle this for us. This method should be used when we want to programmatically focus an element as a result of another user action. (Ex: We focus the first element inside of a popover when the user presents it, but the popover is not always presented as a result of keyboard action.)
309+
*/
307310
"setFocus": (elements: HTMLElement[]) => Promise<void>;
308311
}
309312
interface IonAvatar {

core/src/components/app/app.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export class App implements ComponentInterface {
6161
}
6262

6363
/**
64-
* @internal
6564
* Used to set focus on an element that uses `ion-focusable`.
6665
* Do not use this if focusing the element as a result of a keyboard
6766
* event as the focus utility should handle this for us. This method

core/src/components/segment/segment.tsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -342,21 +342,35 @@ export class Segment implements ComponentInterface {
342342
const centeredX = activeButtonLeft - scrollContainerBox.width / 2 + activeButtonBox.width / 2;
343343

344344
/**
345-
* We intentionally use scrollBy here instead of scrollIntoView
345+
* newScrollPosition is the absolute scroll position that the
346+
* container needs to move to in order to center the active button.
347+
* It is calculated by adding the current scroll position
348+
* (scrollLeft) to the offset needed to center the button
349+
* (centeredX).
350+
*/
351+
const newScrollPosition = el.scrollLeft + centeredX;
352+
353+
/**
354+
* We intentionally use scrollTo here instead of scrollIntoView
346355
* to avoid a WebKit bug where accelerated animations break
347356
* when using scrollIntoView. Using scrollIntoView will cause the
348357
* segment container to jump during the transition and then snap into place.
349358
* This is because scrollIntoView can potentially cause parent element
350-
* containers to also scroll. scrollBy does not have this same behavior, so
359+
* containers to also scroll. scrollTo does not have this same behavior, so
351360
* we use this API instead.
352361
*
362+
* scrollTo is used instead of scrollBy because there is a
363+
* Webkit bug that causes scrollBy to not work smoothly when
364+
* the active button is near the edge of the scroll container.
365+
* This leads to the buttons to jump around during the transition.
366+
*
353367
* Note that if there is not enough scrolling space to center the element
354368
* within the scroll container, the browser will attempt
355369
* to center by as much as it can.
356370
*/
357-
el.scrollBy({
371+
el.scrollTo({
358372
top: 0,
359-
left: centeredX,
373+
left: newScrollPosition,
360374
behavior: smoothScroll ? 'smooth' : 'instant',
361375
});
362376
}

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.3.1"
6+
"version": "8.3.2"
77
}

packages/angular-server/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
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.3.2](https://github.com/ionic-team/ionic-framework/compare/v8.3.1...v8.3.2) (2024-10-02)
7+
8+
**Note:** Version bump only for package @ionic/angular-server
9+
10+
11+
12+
13+
614
## [8.3.1](https://github.com/ionic-team/ionic-framework/compare/v8.3.0...v8.3.1) (2024-09-17)
715

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

0 commit comments

Comments
 (0)