Skip to content

iOS - Edit composer is hidden behind keyboard when editing message #54712

Closed

Description

@IuliiaHerets

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


Version Number: 9.0.80-1
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: Exp
Email or phone of affected tester (no customers): applausetester+394034@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: iPhone 15 Pro Max / iOS 18.2
App Component: Chat Report View

Action Performed:

  1. Launch ND or hybrid app.
  2. Go to any chat that is scrollable.
  3. Send a message.
  4. Swipe down on the composer to dismiss the keyboard.
  5. Long tap on the message > Edit comment.

Expected Result:

The edit composer will scroll to above the keyboard so that the edit composer is visible when editing the message.

Actual Result:

The edit composer is hidden behind keyboard.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6704735_1735705105702.ScreenRecording_01-01-2025_12-18-00_1.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jan 1, 2025
  2. melvin-bot commented on Jan 1, 2025

    @melvin-bot

    Triggered auto assignment to @Beamanator (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  3. melvin-bot commented on Jan 1, 2025

    @melvin-bot

    Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  4. melvin-bot commented on Jan 1, 2025

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jan 1, 2025

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. Beamanator commented on Jan 1, 2025

    @Beamanator
    Contributor

    Seems likely that this is related to #42143 🤔 - posted in slack thread

  7. rojiphil commented on Jan 1, 2025

    @rojiphil
    Contributor

    Seems likely that this is related to #42143

    Just checked but It does not look like it is related to this and I cannot reproduce it as well. Or maybe we need more information to reproduce.

    42143-ios-st-no-rep.mp4
  8. truph01 commented on Jan 2, 2025

    @truph01
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    • The edit composer is hidden behind keyboard.

    What is the root cause of that problem?

    • When focusing on the edit comment composer, we use the following logic:

    InteractionManager.runAfterInteractions(() => {
    requestAnimationFrame(() => {
    reportScrollManager.scrollToIndex(index, true);
    });
    });

    This logic is intended to scroll to the editing message after the keyboard is displayed. However, using InteractionManager.runAfterInteractions does not guarantee that the keyboard is fully visible before calling reportScrollManager.scrollToIndex(index, true).

    • The bug occurs inconsistently and is not easily reproducible.

    What changes do you think we should make in order to solve the problem?

    • We can wait for the keyboard to be fully displayed before scrolling. To achieve this, we can use:
    const keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', (e) => {
                                        reportScrollManager.scrollToIndex(index, true);
                                        keyboardDidShowListener.remove();
                                    });
    

    instead of the current logic.

    • We could consider applying the logic separately for web and native platforms. On the web, we can retain the current logic, while for native, we could implement the updated approach. However, since editing on the web does not involve scrolling, it seems unnecessary to make any changes there.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    What alternative solutions did you explore? (Optional)

  9. rojiphil commented on Jan 2, 2025

    @rojiphil
    Contributor

    On spending some more time on testing, I notice that the edit composer does get covered to some extent although I do not see it covered completely as described in the issue. But seems like solving it would also solve the issue here. Also, I notice quick jump up and down instead of a smooth one.
    @kirillzyusko Do you also notice this?

    42143-ios-st-rep.mp4
  10. kirillzyusko commented on Jan 2, 2025

    @kirillzyusko
    Contributor

    @rojiphil In my case it's reproducible only in release variant. In debug everything works well 🤷‍♂️

    Will try to search for a solution 👀

  11. Beamanator commented on Jan 2, 2025

    @Beamanator
    Contributor

    Seems like the PR was reverted 😅

  12. kirillzyusko commented on Jan 2, 2025

    @kirillzyusko
    Contributor

    Seems like the PR was reverted 😅

    Unfortunately 😔

  13. added and removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jan 2, 2025
  14. Beamanator commented on Jan 2, 2025

    @Beamanator
    Contributor

    Can't reproduce anymore due to revert 👍 🤷

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringReviewingHas a PR in reviewWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions