Skip to content
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: ion-back-button ignores global config for backButtonText #24052

Closed
4 of 6 tasks
vadimwe opened this issue Oct 9, 2021 · 6 comments
Closed
4 of 6 tasks

bug: ion-back-button ignores global config for backButtonText #24052

vadimwe opened this issue Oct 9, 2021 · 6 comments
Labels
package: angular @ionic/angular package type: bug a confirmed bug report
Milestone

Comments

@vadimwe
Copy link

vadimwe commented Oct 9, 2021

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

ion-back-button ignores global config:

IonicModule.forRoot({ backButtonText: '', }),

Expected Behavior

back button contains only icon

Steps to Reproduce

Update to "@ionic/angular": "^5.8.3" with "@angular/*": "~12.2.9"

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.17.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.8.3
@angular-devkit/build-angular : 12.2.9
@angular-devkit/schematics : 12.0.3
@angular/cli : 12.2.9
@ionic/angular-toolkit : 4.0.0

Cordova:

Cordova CLI : 10.0.0
Cordova Platforms : android 10.1.0, ios 6.2.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 16 other plugins)

Utility:

cordova-res : 0.15.3
native-run : 1.4.1

System:

Android SDK Tools : 26.1.1 (/Users/vs/Library/Android/sdk)
ios-deploy : 1.11.4
ios-sim : 8.0.2
NodeJS : v12.18.3 (/usr/local/bin/node)
npm : 6.14.6
OS : macOS Big Sur
Xcode : Xcode 13.0 Build version 13A233

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Oct 9, 2021
@site-chenwei
Copy link

I also encountered this problem

@vadimwe
Copy link
Author

vadimwe commented Oct 11, 2021

Quick fix if you need.

variables.scss or another global file:
ion-back-button { &::part(text) { display: none; } }

@EinfachHans
Copy link
Contributor

I debugged a bit. Looks like this commit causes this.

config.reset(configObj); in the initialize is first called with:

_zoneGate: function(),
backButtonText: "",
persistConfig: false

and then called again (from defineCustomElements.globalScripts) with:

m: Map {"persistConfig" => false, "backButtonText" => "", "_zoneGate" => function, "mode" => "ios"} ,
persistConfig: false

@liamdebeasi liamdebeasi added package: angular @ionic/angular package type: bug a confirmed bug report labels Oct 11, 2021
@ionitron-bot ionitron-bot bot removed the triage label Oct 11, 2021
@liamdebeasi liamdebeasi added this to the 5.8.4 milestone Oct 11, 2021
@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #24054, and a fix will be available in an upcoming release of Ionic Framework.

@liamdebeasi
Copy link
Contributor

This is fixed in Ionic Angular v5.8.4. Thanks for the report!

npm install @ionic/angular@latest

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 10, 2021

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: angular @ionic/angular package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants