Ion-list font size not working right on orientation change for iPhone
See original GitHub issueBug Report
Ionic version:
[x] 4.x
Current behavior: I have 3 lists wrapped in swiper slides. On changing orientation from portrait to landscape font-size of ion-item in ion-list is increased. But on changing the orientation back to portrait still large font size is used.
Using swiper module https://github.com/nolimits4web/Swiper instead of ion-slide
Expected behavior: Font-size should come back to the right size on changing orientation.
Steps to reproduce:
Related code:
<div class="swiper-wrapper">
<div class="swiper-slide imagery-swiper">
<ion-searchbar @ionInput="filterAvwx = $event.target.value"></ion-searchbar>
<ion-list>
<ion-item v-for="(tab, tabindex) in filteredItems" :key="tabindex" class="item-icon-right" v-on:click="selectTab(tab)" v-if="tab.t && (tab.c || tab.i)">
<ion-label>
<span v-html="highlight(tab, filterAvwx)"></span>
</ion-label>
<ion-icon name="arrow-forward" slot="end" mode="ios" v-if="tab.c"></ion-icon>
</ion-item>
</ion-list>
</div>
<div class="swiper-slide imagery-swiper">
<ion-list>
<ion-item v-for="(subtabgroup, subtabgroupindex) in avwxServiceRef.selectedTab.c" :key="subtabgroupindex" v-show="subtabgroup.t" class="item-icon-right" v-on:click="selectSubtabGroup(subtabgroup)">
<ion-label>
<span v-html="highlight(subtabgroup, filterAvwx)"></span>
</ion-label>
<ion-icon name="arrow-forward" mode="ios" slot="end" v-if="subtabgroup.c"></ion-icon>
</ion-item>
</ion-list>
</div>
</div>
Other information: Maybe this is because I am wrapping ion-list inside swiper module, but why would using swiper div has any effect on font-size of ion-list.
-
Initially it looks ike this in landcape
-
On moving it to Portrait fontsize increases as desired.
-
Changing back to landscape.
Ionic info:
"@ionic/core": "4.0.0-rc.0",
"@ionic/vue": "0.0.1",
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:12 (2 by maintainers)
Top Results From Across the Web
Ion-list font size not working right on orientation change for ...
Current behavior: I have 3 lists wrapped in swiper slides. On changing orientation from portrait to landscape font-size of ion-item in ion-list ......
Read more >Preserve HTML font-size when iPhone orientation changes ...
Preserve HTML font-size when iPhone orientation changes from portrait to landscape - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing ......
Read more >Unable to use Messages app in landscape - Apple Discussions
Hello,. I just got my iPhone 12 Mini. In the Messages app, landscape (horizontal) orientation does not work. In the message list, inside...
Read more >List's items lose alignment when changing the screen rotation
I need really to show continuously the select UI at left, but the text can be truncated. The error is when I rotates...
Read more >iPhone: font-size gets bigger on orientation chg - SitePoint
I want the font-size throughout not to change (can change when user chooses to zoom up, but I don't want any font-sizes to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
StackOverflow to the rescue:
@manucorporat here is the sample app in which we can reproduce this issue. Go to preference page.
https://github.com/stripathix/ionic-vue
Initially it looks like this
On orientation change it font size changes
Again on orientation change font stays same as in (2)
*Note: This issue occurs only if you run app on device or simulator on browser this issue does not occur. So please run this in simulator iPhone 8. I am using capacitor for packaging.