Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

[WEEX-434][iOS] fix the input cannot move down to original position a… #1239

Closed
wants to merge 1 commit into from

Conversation

ha1o0
Copy link

@ha1o0 ha1o0 commented Jun 4, 2018

fix the input cannot move down to original position and the toolbar of keyboard cover the input component when on bottom

@weex-bot
Copy link

weex-bot commented Jun 4, 2018

Messages
📖 No android file has been changed.
📖 android build verification finished.

Generated by 🚫 dangerJS

@ha1o0 ha1o0 force-pushed the iOS-bugfix-input-moveup branch 2 times, most recently from 94e6d15 to 6250566 Compare June 6, 2018 08:51
…nd the toolbar of keyboard cover the input component when on bottom
@wqyfavor
Copy link
Member

Please provide the page source. I put an edit at the bottom of a page but cannot reproduce this issue. @weifengsmile

@ha1o0
Copy link
Author

ha1o0 commented Jun 25, 2018

<template>
  <div class="wrapper">
    <text class="greeting">The environment is ready!</text>
    <input type="text" placeholder="Input Text" class="input" value=""/>
  </div>
</template>

<script>
export default {
  name: 'App',
  data () {
    return {
    }
  }
}
</script>

<style scoped>
.input {
    background-color: #ffffff;
    margin-top: 300px;
    width: 300px;
    height: 80px ;
    padding: 20px;
    color: #000000;
  }
  .wrapper {
    justify-content: center;
    align-items: center;
    background-color: #888888;
  }
  .greeting {
    text-align: center;
    margin-top: 70px;
    font-size: 50px;
    color: #41B883;
  }
</style>

code

It is very simple. You can check the image and The following is the result:
init page
the input component focus
the keyboard dismiss

Issue 1: The WXRootView cannot reset to original position.
Issue 2: The keyboards cover a apart of the input component.

@wqyfavor

@wqyfavor
Copy link
Member

I cannot reproduce with your source code using playground. What iOS version are you using. Why there is no navigation bar in you picture.

@ha1o0
Copy link
Author

ha1o0 commented Jun 26, 2018

iOS 11.1, and the weexSDK version is the latest version in pods. I didn't use the playground app, this is the result from iOS simulator, and there is the same issue in real device. @wqyfavor

@wqyfavor
Copy link
Member

Please provide your xcode project. I really cannot reproduce. I don't know the differences between playground and your app. Or you may use playground or Taobao app to scan your bundle and to see if this issue can reproduce. @weifengsmile

@ha1o0
Copy link
Author

ha1o0 commented Jun 26, 2018

This is the iOS xcode project:
ios-issue.zip
And this issue can not be reproduced in the playground, it is different from simulator and real device.
You can try it in simulator or real device. @wqyfavor
This is the version that I have fixed the issue.
ios-fixed.zip

@wqyfavor
Copy link
Member

@weifengsmile Please close your PR. I created another one and is a little different from yours. #1297

Your fix cannot work in Playground. So I add 20px to offset directly.

@ha1o0
Copy link
Author

ha1o0 commented Jun 27, 2018

ok, but you'd better pay attention to the difference between iOS 10 and iOS 11 @wqyfavor

@ha1o0 ha1o0 closed this Jun 27, 2018
@ha1o0 ha1o0 deleted the iOS-bugfix-input-moveup branch November 10, 2023 06:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants