Skip to content

Commit 2d2b081

Browse files
Merge branch 'main' into next (#29957)
2 parents 0b18b6e + 0eb1c7a commit 2d2b081

39 files changed

+485
-241
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,28 @@
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.3](https://github.com/ionic-team/ionic-framework/compare/v8.3.2...v8.3.3) (2024-10-16)
7+
8+
9+
### Bug Fixes
10+
11+
* **tabs, tab-bar:** use standalone tab bar in Vue, React ([#29940](https://github.com/ionic-team/ionic-framework/issues/29940)) ([b7b383b](https://github.com/ionic-team/ionic-framework/commit/b7b383bee080b72de2e6307ff9a9a051314c69ed)), closes [#29885](https://github.com/ionic-team/ionic-framework/issues/29885) [#29924](https://github.com/ionic-team/ionic-framework/issues/29924)
12+
13+
14+
15+
16+
17+
## [8.3.2](https://github.com/ionic-team/ionic-framework/compare/v8.3.1...v8.3.2) (2024-10-02)
18+
19+
20+
### Bug Fixes
21+
22+
* **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)
23+
24+
25+
26+
27+
628
## [8.3.1](https://github.com/ionic-team/ionic-framework/compare/v8.3.0...v8.3.1) (2024-09-17)
729

830

core/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,25 @@
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.3](https://github.com/ionic-team/ionic-framework/compare/v8.3.2...v8.3.3) (2024-10-16)
7+
8+
**Note:** Version bump only for package @ionic/core
9+
10+
11+
12+
13+
14+
## [8.3.2](https://github.com/ionic-team/ionic-framework/compare/v8.3.1...v8.3.2) (2024-10-02)
15+
16+
17+
### Bug Fixes
18+
19+
* **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)
20+
21+
22+
23+
24+
625
## [8.3.1](https://github.com/ionic-team/ionic-framework/compare/v8.3.0...v8.3.1) (2024-09-17)
726

827

core/api.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ ion-alert,css-prop,--width,md
181181
ion-app,none
182182
ion-app,prop,mode,"ios" | "md",undefined,false,false
183183
ion-app,prop,theme,"ios" | "md" | "ionic",undefined,false,false
184+
ion-app,method,setFocus,setFocus(elements: HTMLElement[]) => Promise<void>
184185

185186
ion-avatar,shadow
186187
ion-avatar,prop,mode,"ios" | "md",undefined,false,false

core/package-lock.json

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

core/scripts/testing/styles.css

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

core/src/components.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ export namespace Components {
324324
* The mode determines the platform behaviors of the component.
325325
*/
326326
"mode"?: "ios" | "md";
327+
/**
328+
* 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.)
329+
*/
327330
"setFocus": (elements: HTMLElement[]) => Promise<void>;
328331
/**
329332
* The theme determines the visual appearance of the component.

core/src/components/app/app.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export class App implements ComponentInterface {
1717
@Element() el!: HTMLElement;
1818

1919
/**
20-
* @internal
2120
* Used to set focus on an element that uses `ion-focusable`.
2221
* Do not use this if focusing the element as a result of a keyboard
2322
* event as the focus utility should handle this for us. This method

core/src/components/popover/test/size/index.html

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
ion-app > ion-content {
1717
--background: #dddddd;
1818
}
19-
ion-content button {
19+
ion-content button.trigger {
2020
padding: 12px 16px;
2121
}
2222
.grid {
@@ -57,26 +57,30 @@
5757
<div class="grid">
5858
<div class="grid-item">
5959
<h2>Cover</h2>
60-
<button id="cover-trigger">Trigger</button>
60+
<button id="cover-trigger" class="trigger">Trigger</button>
6161
<ion-popover show-backdrop="false" class="cover-popover" trigger="cover-trigger" size="cover">
6262
<ion-content class="ion-padding"> My really really really really long content </ion-content>
6363
</ion-popover>
6464
</div>
6565
<div class="grid-item">
6666
<h2>With Event</h2>
67-
<button id="event-trigger" onclick="openPopover('event-popover', event, 'false')">Trigger</button>
67+
<button id="event-trigger" class="trigger" onclick="openPopover('event-popover', event, 'false')">
68+
Trigger
69+
</button>
6870
</div>
6971

7072
<div class="grid-item">
7173
<h2>Auto</h2>
72-
<button id="auto-trigger">Trigger</button>
74+
<button id="auto-trigger" class="trigger">Trigger</button>
7375
<ion-popover show-backdrop="false" class="auto-popover" trigger="auto-trigger">
7476
<ion-content class="ion-padding"> My really really really really long content </ion-content>
7577
</ion-popover>
7678
</div>
7779
<div class="grid-item">
7880
<h2>No Event</h2>
79-
<button id="no-event-trigger" onclick="openPopover('no-event-popover', null, 'true')">Trigger</button>
81+
<button id="no-event-trigger" class="trigger" onclick="openPopover('no-event-popover', null, 'true')">
82+
Trigger
83+
</button>
8084
</div>
8185
</div>
8286
</ion-content>

core/src/components/segment/segment.tsx

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

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

0 commit comments

Comments
 (0)