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

input 点击其他地方未取消焦点,此时页面跳转后,高度存在问题 #156

Open
shenmissing opened this issue May 5, 2019 · 9 comments
Labels
bug Something isn't working suggestion an idea put forward for consideration ui about component library

Comments

@shenmissing
Copy link

input聚焦时 点击下面的“出生日期”, input没取消焦点,导致图2的现象, 在此基础上,点击下面的按钮“立即取名”,跳转到图3页面,该页面高度显示有问题 页面用的是scroller ,高度是动态计算的, 发现getSystemInfo 返回的 viewportHeight 不是全屏高度,减去了上页面input键盘的高度

@shenmissing shenmissing added the bug Something isn't working label May 5, 2019
@beatles-chameleon
Copy link
Collaborator

beatles-chameleon commented May 6, 2019

请贴下使用<input/>处的代码

@shenmissing
Copy link
Author

<input :value="lastName" @input="lastNameInput" type="text" placeholder="请输入姓氏(必须汉字)" cStyle="border:0;padding-left:0;color:#666;width:100%;background:none" />

@shenmissing
Copy link
Author

暂时发现 input聚焦时 点击其他地方一般都保持聚焦状态,但是点击image时 会失去焦点

@huyuangang
Copy link

请发一下相关版本,chameleon-tool、chameleon-ui-builtin,自查一下有没有阻止浏览器默认行为的情况(event.preventDefault)

@shenmissing
Copy link
Author

shenmissing commented May 6, 2019

chameleon-tool@0.3.2
"chameleon-ui-builtin": "^0.2.0"
并没有阻止浏览器默认行为的情况
测试机型:iphone 6s

@shenmissing
Copy link
Author

最新发现:‘出生日期‘ 那一块的表单是一个组件(A组件),而 日期的弹窗选项 是A组件里面的B组件,这种情况才出现的上图的问题 , 后面把B组件拿出来 跟A组件同级(是因为scroller 里面的fixed定位失效了),就没有上图的问题了,

@beatles-chameleon
Copy link
Collaborator

建议把 fixed 布局的容器放到 scroller 外面

@shenmissing
Copy link
Author

你这个回答 貌似跟bug没什么关系 还是存在这种场景的 组件套组件的情况,不然就降低了组件的复用了

@beatles-chameleon
Copy link
Collaborator

目前是有这个限制的,后续会提供简版滚动视图,不受此限制

@startheart startheart added suggestion an idea put forward for consideration ui about component library labels May 27, 2020
@startheart startheart reopened this May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working suggestion an idea put forward for consideration ui about component library
Projects
None yet
Development

No branches or pull requests

4 participants