青阳_1900
青阳_1900
  • 发布:2021-03-17 12:21
  • 更新:2021-03-17 12:22
  • 阅读:876

【报Bug】配置 manifest 中 app-plus.softinput.mode 配置为 adjustPan 云端打包后,安卓中 onKeyboardHeightChange 事件失效

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: macOS Big Sur 11.2.3

HBuilderX类型: 正式

HBuilderX版本号: 3.1.4

手机系统: Android

手机系统版本号: Android 11

手机厂商: 一加

手机机型: 一加 7t pro

页面类型: nvue

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
<template>  
  <view class="content">  
    <input class="input" placeholder="测试键盘44431" />  
    <input class="input" placeholder="测试键盘44431"  
      @keyboardheightchange="showToast(`input.@keyboardheightchange: ${$event.detail.height}` )" />  
  </view>  
</template>  

<script>  
  export default {  
    onLoad() {  
      // 全局键盘高度监听事件  
      uni.onKeyboardHeightChange(res => this.showToast(`uni.onKeyboardHeightChange: ${res.height}`))  
    },  
    methods: {  
      showToast(title) {  
        uni.showToast({  
          title,  
          icon: 'none',  
        })  
      },  

    }  
  }  
</script>  

<style>  
  .input {  
    padding: 0 30rpx;  
    height: 100rpx;  
    background: rgba(0, 0, 0, 0.1);  
    margin-bottom: 30rpx;  
  }  
</style>  

操作步骤:

云端打包后在安卓机器上发现键盘高度事件丢失

预期结果:

键盘高度事件正常

实际结果:

键盘高度事件丢失

bug描述:

配置 manifestapp-plus.softinput.mode 配置为 adjustPan 云端打包后,安卓中 onKeyboardHeightChange 事件失效

无论是 uni.onKeyboardHeightChange 还是 <input @keyboardheightchange />

本地链接真机调试没有问题,云端打包后,真机运行就有问题了

2021-03-17 12:21 负责人:无 分享
已邀请:
青阳_1900

青阳_1900 (作者)

去掉 adjustPan 的配置后,重新云端打包安卓下键盘高度事件监听就恢复了

该问题目前已经被锁定, 无法添加新回复