Preventing ion depletion when focusing <select>

I noticed that when every time an enter / select tag is focused inside the modal, it dynamically changes the height of the ionic content (for example, sets the height to 240px and adds an overflow visibility).

Here's a screenshot:

If a tag with a tag is selected

enter image description here

If the selected tag is not focused

enter image description here

Now the question is how to prevent ionic changes in the height of the ion content? As currently every time I focus on the select tag it makes the layout ugly.

thank

+3


source to share


1 answer


I also ran into the same issue with the ionics Scroll changing to the input focus, I noticed the same thing with the ionic scroll directive, so I just added a fixed height to the content of the ions.

ion-content{
    height: 80% !important;
    overflow: hidden !important;
}

      



Now it will always maintain 80% height and keep the overflow hidden while scrolling, you might want to add your own class or id to the ionic content rather than using the directive name. Thought that it would be simpler as an example for my problem, I set the class "box-full" so it will only be used when I need it on some of the ionic scrolling elements. Hope this solution helps you and everyone else who has had this problem.

0


source







All Articles