-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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: vue, when adding custom classes, the ion-page critical classes get overridden #24772
Comments
I have created a Pull Request that may fix this: #24773 |
Thanks! Here is a dev build of the fix so you can get unblocked until this fix ships:
|
Great! Thanks @liamdebeasi |
Thanks for the issue. This has been resolved via #24776, 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
Current Behavior
When I add classes to the
<ion-page>
element, theion-page
class and theion-page-invisible
class (when in router outlet) are overridden by my own class attribute, which causes the page to be displayed incorrectly.Expected Behavior
The class attribute is inherited correctly, so both my custom classes and the ionic critical classes are applied to the
<div>
element that gets rendered byIonPage
Steps to Reproduce
<ion-page class="test-class">
Code Reproduction URL
https://dashboard.ionicframework.com/app/d447a0a8/preview
Ionic Info
Ionic:
Ionic CLI : 6.18.1
Ionic Framework : @ionic/vue 6.0.7
Capacitor:
Capacitor CLI : 3.4.1
@capacitor/android : not installed
@capacitor/core : 3.4.1
@capacitor/ios : not installed
Utility:
cordova-res : not installed globally
native-run : 1.5.0
System:
NodeJS : v12.22.1
npm : 6.14.12
OS : macOS Monterey
Additional Information
Attrs gets processed later, which I think causes the components own class attribute to get overridden. When
attrs.class
is defined, it should also be applied to the['class']
section of this componenthttps://github.com/ionic-team/ionic-framework/blob/main/packages/vue/src/components/IonPage.ts#L18
The text was updated successfully, but these errors were encountered: