Keyboard up and shift of view event is different from mobile-web vs Ionic?


#1

On mobile web, when I click on the input element, keyboard comes up and the whole window gets shifted at the same time.

However, on ion view app in actual device, when I click on the input element, keyboard comes up but the whole window does not get shifted until I actually type something into the input element.

Is this known issue?


#2

Which keyboard plugin have you used? Pure cordova or official Ionic keyboard plugin?


#3

@fkkcloud sorry, I had to make the question clear, I was half-asleep when I make this post. I installed this

ionic plugin add com.ionic.keyboard

to install keyboard for my projects…

I have input element that has ng-focus attribute to set with a function like so.

 <input ng-focus="someFunc()" ..........></input>

here is the real question that I had.

In web-mobile, this triggered as soon as I touch/hit input element.

However in Ionic View, this triggered only after I touch/hit it and start to typing some stuff in it which is problem for me.
–> How would I make the ng-focus to be triggered as it gets touched? (not start to typing)


#4

Have you tried it on a real device? Ionic View is still under development.


#5

I will try to tonight after all the struggles of getting provision files and stuff for Apple!


#6

this is also happening for devices as well.

input element’s ng-focus attribute is only occurred when starting typingnot when it gets clicked and bar start blinking.


#7

I had scroll=‘false’ on my ion-content to use CSS height:100% for my map,
and that was why it did 2 different sections of scroll when keyboard comes up…

Now, scroll=‘true’ and by adding .scroll like below, fixes all the problem…

   .scroll{ 
        height: 100%;
    }
    #map-canvas {
        height: 100%;
        margin: 0px;
        padding: 0px
    }

#8

Nice solution, congrats