如何解决 textarea 被键盘覆盖?

小程序 文章 2020-09-01 14:41 570 0 全屏看文

AI助手支持GPT4.0

如何解决 textarea 被键盘覆盖?How to solve textarea being covered by keyboard?

如何解决 textarea 被键盘覆盖?
     class=   "add-comment" >       <view class="active" wx:if="{{activeComment}}">         <textarea class="commentText" placeholder="说点什么吧" focus maxlength="400"         bind:input="setValue" data-key="commentText">    textarea>         <view class="operation" >           <view class="cancel" bind:tap="activeComment">取消       view>           <view class="post" bind:tap="postComment">发送       view>             view>           view>       <view class="unactive" wx:else bind:tap="activeComment">说点什么吧       view>       view>  

fixed 在 add-comment 上, 尝试了给textarea加fixed="true"也无效

Class = "add comment" > < view class = "active" Wx: if "{activecomment}}" > < textarea class = "commenttext" placeholder = say something "focus MaxLength = 400" bind:input= "setValue" data-key="commentText">textarea>              cancel View > send View > View > View > < view class = "inactive" Wx: else bind:tap= "Active comment" > say something View > View > fixed on add comment, it is invalid to add fixed "true" to textarea

回答:

乐豆信息:

使用cursor-spacing值指定光标与键盘的距离。

微喵网络:

弄一个 [ 能复现问题的简单的 ] 代码片段

https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

-EOF-

AI助手支持GPT4.0