-
Notifications
You must be signed in to change notification settings - Fork 13.5k
bug: large title transition does not account for empty back button text #28751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: large title transition does not account for empty back button text #28751
Comments
Faced the same issue. A white space as "text" solve temporary the issue
|
For me this only occurs in iOS mode. Using the temporary solution of @alexdabast for now. Visually the app will navigate to the desired page, but without any animations. On MD-mode the animations still occur. |
Hi everyone, Here is a dev build with a proposed fix if anyone is interested in testing: |
#29327) Issue number: resolves #28751 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> The large title transition does not account for back buttons with no text value. We assume that the [`.button-text` element ](https://github.com/ionic-team/ionic-framework/blob/bfaf528e61fd82c9106e3c5060921fb79d97156a/core/src/components/back-button/back-button.tsx#L168) is always defined, but that is not the case when `text=""` on the back button. As a result, devs were getting errors because we tried to get the bounding box of a undefined. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Revised the large title logic to only grab values from the back button text if the back button text element is actually defined There should be **no behavior change** when the back button text element is defined. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev Build: `7.8.5-dev.11713282122.18cabf98`⚠️ Reviewers: Please test this in the sample application on the linked issue. Please be sure to test the following conditions: 1. When the back button text is defined 2. When the back button text is not defined 3. With the default font scale 4. With a larger font scale
Thanks for the issue. This has been resolved via #29327, and a fix will be available in an upcoming release of Ionic Framework. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
v7.x, Nightly
Current Behavior
Only with
@Ionic/angular
>7.5.0
, whenion-back-button
has empty text value:Note that
text=" "
doesn't give a error.Expected Behavior
Allow
text=""
forion-back-button
componentSteps to Reproduce
Code Reproduction URL
https://github.com/roman-rr/bug-backbutton/
Ionic Info
Ionic:
Ionic CLI : 7.1.5 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.6.2
@angular-devkit/build-angular : 17.0.7
@angular-devkit/schematics : 17.0.7
@angular/cli : 17.0.7
@ionic/angular-toolkit : 9.0.0
Capacitor:
Capacitor CLI : 5.6.0
@capacitor/android : not installed
@capacitor/core : 5.6.0
@capacitor/ios : not installed
Utility:
cordova-res (update available: 0.15.4) : 0.14.0
native-run : 2.0.0
System:
NodeJS : v20.10.0 (/usr/local/bin/node)
npm : 10.2.3
OS : macOS Unknown
Additional Information
No response
The text was updated successfully, but these errors were encountered: