Skip to content

bug: card modal gesture is incorrect when webview resizes #28542

@aeharding

Description

@aeharding

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

When using capacitor keyboard resize mode = ionic with open keyboard, gestures on a card modal sometimes don't stick to the user's touch gesture.

If you drag down, the dialog goes further than your drag (gesture seems amplified).

Expected Behavior

The ionic dialog should follow my finger 1:1 when dragging.

Steps to Reproduce

Real scenario reproduction:

  1. Clone repro, install, ionic capacitor build ios, run on device
  2. Open dialog. Keyboard should appear. Try to swipe down. Notice the dialog handle follows your finger perfectly.
  3. Close dialog and try again. Second time usually reproduces for me. (I believe there is a race condition between Ionic dialog setup before Capacitor keyboard resizes the page)

Testing/non-flakey reproduction:

Luckily, it's quite easy to simulate ionic keyboard resize mode = "ionic" by simply setting margin-bottom: 300px or so to <ion-app>.

If you do this, you can always reproduce the issue when you open and attempt to drag the dialog, even in a chrome/firefox device simulator.

Code Reproduction URL

https://github.com/aeharding/ionic-drag

Ionic Info

Ionic:

Ionic CLI : 7.1.1 (/Users/aeharding/.nvm/versions/node/v20.8.1/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 7.5.5

Capacitor:

Capacitor CLI : 5.5.1
@capacitor/android : not installed
@capacitor/core : 5.5.1
@capacitor/ios : 5.5.1

Utility:

cordova-res : not installed globally
native-run : not installed globally

System:

NodeJS : v20.8.1 (/Users/aeharding/.nvm/versions/node/v20.8.1/bin/node)
npm : 10.1.0
OS : macOS Unknown

Additional Information

Real scenario with Capacitor keyboard ionic mode:

PXL_20231116_030353505.mp4

Browser simulation (setting margin-bottom):

Kapture.2023-11-15.at.21.13.00.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions