html - Phonegap, onscreen keyboard on iOS is shifting my content -
html - Phonegap, onscreen keyboard on iOS is shifting my content -
i have phonegap app basic layout controlled translating divs when items clicked. shortened version looks this:
html
<body> <h1 class="main"> market coffee cart </h1> <div class="app"> <div id="home" class="page"> <p> welcome market coffee cart</p> <!-- <div class="lefthalf"> login</div> --> <div class="guestlogin"> go on guest</div> </div> <!-- kind --> <div id="itemtype" class="page right"> <p>what order?</p> <div id="coffee" class="type"> coffee </div> <div id="tea" class="type"> tea </div> <div id="others" class="type"> soda , specialties </div> <div id="snack" class="type"> snacks </div> </div> </body> the css, responsible showing , hiding things this:
css
.page { position: absolute; top: 0; left: 0; width: 100%; height: 100%; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } .page.left { -webkit-transform: translate3d(-100%, 0, 0); transform: translate3d(-100%, 0, 0); } .page.center { -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); } .page.right { -webkit-transform: translate3d(100%, 0, 0); transform: translate3d(100%, 0, 0); } .page.transition { -webkit-transition: .25s; transition-duration: .25s; } the issue having on of pages text input required. when text box gains focus content shifted left , layout ruined. see photos. how can prevent this?
note
i have tried solutions here, , here here have no effect. add together <preference name="keyboardshrinksview" value="false" /> , <meta name="viewport" content="initial-scale=1.0, user-scalable=0, width=device-width, height=device-height"/> nothing. interestingly, warns against setting lastly property tried anyway, no avail.
here how look:
and here how 1 time keyboard has appeared (and hidden itself):
any ideas appreciated.
did seek install keyboard plugin within cordova project before setting keyboardshrinksview preference?
https://github.com/apache/cordova-plugins/tree/master/keyboard
if plugin not first installed, preference not work intended.
html ios css cordova
Comments
Post a Comment