开发者

iPad displaces cursor in textareas

Anyone have any idea why this is happening? I've been hitting my head on the desk for the last 2 hours, trying to figure out why the cursor gets displaced on the iPad. Check out my video to see it:

http://tinypic.com/r/20k6338/7

Here is my CSS:

#newroar-ipad {

position: fixed;

display: block;

opacity: 0;

left: 5px;
top: 0px;

height: 480px !important;
width: 550px !important;
margin-top: 30px;

pointer-events: none;

background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#FFFFFF), to(#CCCCCC));

z-index: 4;

-we开发者_如何学Gobkit-border-radius: 5px;
-webkit-box-shadow: 0px 4px 5px #000;

-webkit-transition: -opacity 0.0s ease-out;
-webkit-transition-duration: .4s;

-webkit-transform: translate(0px, -20px);


}

#newroar-ipad.show {

opacity: 1.0;
pointer-events: auto;
z-index: 4;

-webkit-transition-duration: .4s;
-webkit-transform: translate(0px, 15px);

}

#newroar-ipad-content-header {

margin-top: 10px;

z-index: 4;

width: 548px;
height: 55px;

background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#EBEBEB), to(#CCC)); 

border: 1px solid #CCC;

}

#newroar-ipad-content {

margin-top: 0px;
margin-left: 2px;

background: none;

top: 0;

width: 542px;
height: 400px;

z-index: 4;

}

.newroar-inputfield {

-webkit-appearance: none;

height: 20px !important;
width: 90%;
margin-left: 18px;
margin-bottom: 10px;

background: #FFF;

color: #666;
font-size: 12px;

border-style: none;
padding: 10px;

-webkit-border-radius: 5px !important;

}

.newroar-textarea {

-webkit-appearance: none;

width: 90%;
height: 120px;
margin-left: 18px;
margin-bottom: 10px;

background: #FFF;

color: #666;
font-size: 12px;

border-style: none !important;
border: none !important;

padding: 10px;

-webkit-border-radius: 5px !important;
-webkit-box-shadow: none !important;
outline: none !important;

}

.newroar-selectfield {

font-size: 14px !important;

height: 30px !important;
width: 300px !important;

margin-left: 18px !important;
margin-top: 25px !important;
margin-bottom: 25px !important;



}

You can see I have tried using !important in case it was bringing styling for other form elements in the CSS document, and I tried the -webkit-appearance to see if it would fix it... with no avail. =(

Thanks for any advice you may have!


can you try using position:absolute , rather than fixed

#newroar-ipad {
position: absolute;
/* other style codes */
}

Because ios usually move the input box in focus , to just above the keypad. Seems like the position:fixed code is bringing it back to its original position.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜