-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
v8.8.1 regression from v8.7.17.
IonLabel with dynamic text node child corrupts global styles.
Workaround: <IonLabel><span>{myString}</span></IonLabel>
Expected Behavior
No change to global styles when rendering string in IonLabel
Steps to Reproduce
- Render IonLabel
1.1. Pass a dynamic string containing special characters (< > or similar) directly as a text node child of IonLabel - Observe global ion-item padding/styles reset across entire app
- Wrap the same string in a
<span>— issue disappears
Code Reproduction URL
https://stackblitz.com/edit/h92ft2xq?file=src%2Fmain.tsx
Ionic Info
Ionic:
Ionic CLI : 7.2.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 8.8.1
Utility:
cordova-res : not installed globally
native-run : 2.0.3
System:
NodeJS : v22.17.0 (/usr/local/bin/node)
npm : 10.9.2
OS : macOS Unknown
Additional Information
Code Reproduction URL does not reproduce; it has no global styles that get affected.
I cannot invest more time into this report unfortunately, else I would parse to identify the exact string that causes the issue.
Just happy to advise of our workaround.