-
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: ion-input not working properly with vite and @ionic/core #30323
Comments
Thank you for the issue! It looks like this broke in |
Additionally, I noticed adding this script to the <script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.esm.js"></script> |
this one is working as expected: @ionic/[email protected] |
@DeJy what do you mean by ion-input should display as ionic component and not standard html.? Are you expecting Ionic to render the component as follows: - <ion-input label="Fixed label" label-placement="fixed" placeholder="Enter text" class="sc-ion-input-md-h sc-ion-input-md-s md input-label-placement-fixed in-item hydrated">
+ <ion-input label="Fixed label" label-placement="fixed" placeholder="Enter text" class="sc-ion-input-md sc-ion-input-md-h sc-ion-input-md-s md input-label-placement-fixed in-item hydrated">
<!---->
<label class="input-wrapper" for="ion-input-0">
<div class="label-text-wrapper">
<div class="label-text">Fixed label</div>
</div>
<div class="native-wrapper sc-ion-input-md-s"><input class="native-input" id="ion-input-0" autocapitalize="off" autocomplete="off" autocorrect="off" name="ion-input-0" placeholder="Enter text" spellcheck="false" type="text"></div>
</label>
</ion-input> ? |
I'm expecting this
But I'm getting this
|
The issue is not only with ion-input. As you can see in the example below, ion-alert that is opening from the ion-select doesn't have the right format. |
Identified the responsible change in Stencil: stenciljs/core#5892 |
@DeJy can you help me understand what you are using the class names for? |
I'm not usign any specific ionic class names or ovewrite any of them in my custom css. The example of the html above is the outcome of the build when I use version 8.5.3 (not working/not expected) vs 7.x.x (working/expected) I hope this answers your question. |
Thanks for your feedback @DeJy - I've identified the issue and raised a PR with a fix in stenciljs/core#6224 |
A fix is on its way in #30132 |
I published a dev build which resolves the issue: |
@christian-bromann There is still an issue with LoadingController with the dev build (see here: https://stackblitz.com/edit/sb1-tqcwwalu?file=package.json), icon in the ion-spinner is not moving. The Loading pop-up style is now good, but the icon is not spinning as expected. Standalone ion-spinner is working well. |
Prerequisites
Ionic Framework Version
v8.x
Current Behavior
Ion-input is not displayed correctly when I'm building my vanilla js project with vite.js. It works with version 7, but not with version 8. sc-ion-input-md is class is missing from the input tag.
Expected Behavior
ion-input should display as ionic component and not standard html.
Steps to Reproduce
Code Reproduction URL
https://stackblitz.com/edit/sb1-tqcwwalu?file=package.json
Ionic Info
Issue is with all v8 versions
Additional Information
No response
The text was updated successfully, but these errors were encountered: