Skip to content

Slightly scrolling up in compose box will dismiss the keyboard #3323

Closed

Description

@isagoico

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Expected Result:

Scrolling up in a long message should not dismiss the keyboard.

Actual Result:

Slightly scrolling up the message in compose box will dismiss the keyboard.

Action Performed:

  1. Log in on mobile app
  2. Navigate to a conversation
  3. Tap on compose box and write a long message (long enough to enable scrolling)
  4. Scroll the message to the top.

Workaround:

User has to recall the keyboard everytime after scrolling up.

Platform:

Where is this issue occurring?

Web
iOS ✔️
Android ✔️
Desktop App
Mobile Web

Version Number: 1.0.61-0

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

nosound.mp4

Expensify/Expensify Issue URL:

View all open jobs on Upwork

Activity

  1. MelvinBot commented on Jun 2, 2021

    @MelvinBot
    Contributor

    Triggered auto assignment to @bondydaa (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  2. bondydaa commented on Jun 2, 2021

    @bondydaa
    Contributor

    tossing to the pool

  3. removed their assignment
    on Jun 2, 2021
  4. isagoico commented on Jun 7, 2021

    @isagoico
    Author

    Issue reproducible today during KI retests

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jun 7, 2021
  6. MelvinBot commented on Jun 7, 2021

    @MelvinBot
    Contributor

    Triggered auto assignment to @kevinksullivan (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

  7. isagoico commented on Jun 13, 2021

    @isagoico
    Author

    Issue reproducible today during KI retests

  8. kevinksullivan commented on Jun 19, 2021

    @kevinksullivan
    Contributor

    Sorry for the delay on this one. Posted to upwork!

    https://www.upwork.com/jobs/~01b905fa59a688b29f

  9. MelvinBot commented on Jun 19, 2021

    @MelvinBot
    Contributor

    Triggered auto assignment to @puneetlath (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  10. parasharrajat commented on Jun 19, 2021

    @parasharrajat
    Member

    Proposal

    1. We are using PanRasponder over the Composer to close it but it lacks two basic checks.
    2. First we should only close the keyboard when the user is swiping down.
    3. Second, We need to increase the swipe distance, as optional we can also check for the velocity of the swipe so that if a user is swiping fast , only then close it. (Let me know about this optional part).
      To fix the above problem at base we need to do the following update to code here https://github.com/Expensify/Expensify.cash/blob/408b7e00cf33c16600af0b67b819c764fcb5388a/src/components/SwipeableView/index.native.js#L16
    // We increase the distance, we need to carefully adjust this value but I suggest it should be equal to the max height of composer
            const minimumPixelDistance = 116;
            this.oldY = 0;
            this.panResponder = PanResponder.create({
    
                // The PanResponder gets focus only when the y-axis movement is over minimumPixelDistance
                onMoveShouldSetPanResponderCapture:
                (_event, gestureState) => {
                    // we only close it when direction is bottom and minimumdistance is covered.
                    if ((gestureState.dy - this.oldY) > 0 && gestureState.dy > minimumPixelDistance) { return true; }
                    this.oldY = gestureState.dy;
                },
    
                // Calls the callback when the swipe down is released; after the completion of the gesture
                onPanResponderRelease: this.props.onSwipeDown,
            });
        }
        ```
  11. isagoico commented on Jun 21, 2021

    @isagoico
    Author

    Issue reproducible today during KI retests.

  12. puneetlath commented on Jun 22, 2021

    @puneetlath
    Contributor

    I say we just try 2 first and see how that feels. Then we can add 3 in a follow up issue if we think it's also necessary.

  13. kevinksullivan commented on Jun 22, 2021

    @kevinksullivan
    Contributor
  14. kevinksullivan commented on Jul 1, 2021

    @kevinksullivan
    Contributor

    Paid in upwork

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions