Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于在小程序在iphone xs max 系统12.2,Input 组件无法被遮罩层覆盖 #2653

Closed
Zhou-Bill opened this issue Apr 1, 2019 · 6 comments

Comments

@Zhou-Bill
Copy link

Zhou-Bill commented Apr 1, 2019

问题描述
关于在小程序在iphone xs max 系统12.2,Input 组件无法被遮罩层覆盖

复现步骤

  1. 遮罩层无法遮挡 input 组件, input 框貌似在遮罩层上方,已使用过z-index属性
  2. 出现的情况只存在于 iphone xs max 系统是12.2版本的机子上

image

  • 其中test 为遮罩层
  • <BannerSearch /> 只是一个简单的input 组件
BannerSearch.js
<View className={styles.container}>
    <Input placeholder={"input"} className={styles.input} placeholderStyle='color:#b2b2b2' onInput={this.handleChange}/>
     <Button className={styles.searchBtn} hoverClass={"none"} type={"primary"} onClick={this.goTo} >搜索</Button>
</View>
.test.module.less

.test {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #000;
      z-index: 99;
}

结果

微信小程序的结果
image

iphone xs max 的结果
image

系统信息

Taro v1.2 及以上版本已添加 taro info 命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。

👽 Taro v1.2.17

Taro CLI 1.2.17 environment info:
System:
OS: Windows 10
Binaries:
Node: 11.2.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.13.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

@taro-bot
Copy link

taro-bot bot commented Apr 1, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@js-newbee
Copy link
Contributor

@Zhou-Bill input 组件是原生组件,层级无法被覆盖的
https://developers.weixin.qq.com/miniprogram/dev/component/native-component.html

@Zhou-Bill
Copy link
Author

@Zhou-Bill input 组件是原生组件,层级无法被覆盖的
https://developers.weixin.qq.com/miniprogram/dev/component/native-component.html

但是遮罩层的布局是position:fixed的话无法遮盖?
另外就是 再其他手机不会出现这个问题,其他手机只的是iphone6s, iphone7 ,iphonex ,和安卓手机,都没出现这个问题。。。

@js-newbee
Copy link
Contributor

@Zhou-Bill input 组件是原生组件,层级无法被覆盖的
https://developers.weixin.qq.com/miniprogram/dev/component/native-component.html

但是遮罩层的布局是position:fixed的话无法遮盖?
另外就是 再其他手机不会出现这个问题,其他手机只的是iphone6s, iphone7 ,iphonex ,和安卓手机,都没出现这个问题。。。

position: fixed 也不是万能的,比如不能覆盖 tabBar,只是想说这种情况多半是小程序自身的限制...

@Zhou-Bill
Copy link
Author

@Zhou-Bill input 组件是原生组件,层级无法被覆盖的
https://developers.weixin.qq.com/miniprogram/dev/component/native-component.html

但是遮罩层的布局是position:fixed的话无法遮盖?
另外就是 再其他手机不会出现这个问题,其他手机只的是iphone6s, iphone7 ,iphonex ,和安卓手机,都没出现这个问题。。。

position: fixed 也不是万能的,比如不能覆盖 tabBar,只是想说这种情况多半是小程序自身的限制...

好吧

@js-newbee
Copy link
Contributor

@Zhou-Bill 建议用原生的写个小 demo 验证一下吧,以免真的是 Taro 的问题 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants