<view class="content" >
<view class="content-box">
<textarea :adjust-position="false" fixed placeholder="请输入"></textarea>
</view>
</view>
</template>
<script setup>
</script>
<style>
.content-box {
position: fixed;
background-color: red;
left: 0;
right: 0;
bottom: 0;
}
</style>

- 发布:2025-09-08 13:56
- 更新:2025-09-08 15:21
- 阅读:38
产品分类: uniapp/App
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: macOs 14.7.2
HBuilderX类型: 正式
HBuilderX版本号: 4.76
手机系统: Android
手机系统版本号: Android 15
手机厂商: OPPO
手机机型: Find X7 Ultra
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
<view class="content" >
<view class="content-box">
<textarea :adjust-position="false" fixed placeholder="请输入"></textarea>
</view>
</view>
</template>
<script setup>
</script>
<style>
.content-box {
position: fixed;
background-color: red;
left: 0;
right: 0;
bottom: 0;
}
</style>
编译到不同机型
<view class="content" >
<view class="content-box">
<textarea :adjust-position="false" fixed placeholder="请输入"></textarea>
</view>
</view>
</template>
<script setup>
</script>
<style>
.content-box {
position: fixed;
background-color: red;
left: 0;
right: 0;
bottom: 0;
}
</style>
编译到不同机型
预期结果:
键盘不上推页面
键盘不上推页面
实际结果:
键盘上推了页面
键盘上推了页面
bug描述:
textarea在设置了position: fixed的区域,:adjust-position=“false”属性在部分机型上不生效。同样的代码编译到不同的手机,有的机型正常,有的机型会上推页面

等下班 (作者) - 1111111
我发现了,出现问题的手机 设置:adjust-position=“true”时,会顶起页面两个键盘高度,设置为false就顶起一个键盘的高度,看附件视频
<template>
<view class="content" >
<view class="content-box">
<textarea :adjust-position="true" fixed placeholder="请输入"></textarea>
</view>
</view>
</template>
<script setup>
</script>
<style>
.content-box {
position: fixed;
background-color: red;
left: 0;
right: 0;
bottom: 0;
}
</style>
这段代码content-box被顶起了bottom 0 的位置在两个键盘高度的地方