Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[madman] prevent pulling the content down inconsistently when the key…
…board shows up Summary: There are actually 2 problems: 1. in madman, we don't want to force-pull the textInput down when showing the keyboard (see #6649713) if the input is already fully-visible 2. the creativeEditor hardcoded the scrollOfset to 95, which is only correct for wizard navigation, but not for editing. For (1): modified ScrollResponder to prevent negative scrolling. Let me know if there's a better approach. For (2): compute the topOffset dynamically, and use it for scrolling purpose - no more hardcoding. Example of the content getting pulled down: {F22068821} So the behavior becomes: - when focusing a textInput, try to bring its bottom to meet the keyboard's top - if the content needs to be pulled down to achieve that, scroll to 0 instead Videos: 5s https://www.facebook.com/pxlcld/mcNs https://www.facebook.com/pxlcld/mcNw 6 https://www.facebook.com/pxlcld/mcNr https://www.facebook.com/pxlcld/mcNq Test Plan: - try madman's creation flow (creative step) and Edit creative flow. The content shouldn't be pulled down anymore when the keyboard shows up. (This used to be more apparent in iPhone 6,6+ due to the bigger screen). - @kristinatastic is happy
- Loading branch information