Ionic keyboard not shifting window when it gets focus


#1

Hi,

I’ve installed ionic keyboard plugin as below.

ionic plugin add com.ionic.keyboard

When I run it on devices, (ios and android) and give focus to input element by touching on it. keyboard comes up but the view is not shifting/scrolling upwards…

Once I start to type something, then the view shifted/scrolled to the right position which is original screen bottom meets top of keyboard.

<!-- Posting -->
    <form ng-controller='PostsCtrl' name='postForm' novalidate>
      <input type='text' 
          ng-model='content' 
          ng-focus='someFunc()'
          maxlength='20' 
          class='postbox'
          id='map-post-input' 
          placeholder='Why its not working?' required>
      <button ng-disabled='postForm.$invalid' 
          ng-click='addPost()' 
          class="postbox button button-small button-assertive" 
          id='map-btn-submit'> {{ timevalue | date:"mm : ss" }} </button>
    </form>

and this elements are added on top of Google Map if that is related information as well…

What could possible go wrong?


#2

Is there anybody who had this problem or resolved it…? :cold_sweat:


#3

okay, I resolved it now.

I had my ion-content , scroll=‘false’ to use CSS height : 100%.

but I had to actually allow the scroll to be true and modify .scroll like so…

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