Zss1990 opened a new issue #2810: [iOS] input标签使用upriseOffset 属性设置值,当该值动态改变时候页面布局会出现问题 URL: https://github.com/apache/incubator-weex/issues/2810 [iOS] 当有多个input标签时候 input被遮挡时候键盘弹起会有bug,通过使用upriseOffset 属性进行设置弹起的高度值,但是当动态该设置该值时候页面布局会出现问题 使用的iOS的weexSDK版本0.24.0 测试demo如下: ``` <template> <div class="wrapper"> <list class="list" @scroll='handleScroll'> <cell> <textarea :rows='10' style='margin-bottom:40px;background-color:red' :upriseOffset='upriseOffset' @shouldBeginEditing='handleClick'></textarea> </cell> <cell> <textarea :rows='10' style='margin-bottom:40px;background-color:red' :upriseOffset='upriseOffset' @shouldBeginEditing='handleClick'></textarea> </cell> <cell> <textarea :rows='10' style='margin-bottom:40px;background-color:red' :upriseOffset='upriseOffset' @shouldBeginEditing='handleClick'></textarea> </cell> <cell> <textarea :rows='10' style='margin-bottom:40px;background-color:red' :upriseOffset='upriseOffset' @shouldBeginEditing='handleClick'></textarea> </cell> <cell> <textarea :rows='10' style='margin-bottom:40px;background-color:red' :upriseOffset='upriseOffset' @shouldBeginEditing='handleClick'></textarea> </cell> <cell> <textarea :rows='10' style='margin-bottom:40px;background-color:red' :upriseOffset='upriseOffset' @shouldBeginEditing='handleClick'></textarea> </cell> <cell> <textarea :rows='10' style='margin-bottom:40px;background-color:red' :upriseOffset='upriseOffset' @shouldBeginEditing='handleClick1'></textarea> </cell> </list> </div> </template> <style scoped> .list { position: absolute; top: 0; left: 0; right: 0; bottom: 0; } .wrapper { flex-direction: column; } </style> <script> module.exports = { data: function(){ return { upriseOffset: 20 } }, methods:{ handleClick(){ this.upriseOffset=300 }, handleScroll({contentOffset}){ // this.upriseOffset=contentOffset.y } } } </script> ``` 其中`shouldBeginEditing`事件为自定义,触发添加input开始编辑时候;触发shouldBeginEditing事件是会设置shouldBeginEditing,这个时候布局会发生错误。
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
