ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.09k stars 13.51k forks source link

bug[ios]: open keyboard is not dismissed when card modal is dragged #30019

Open hedinasr opened 1 day ago

hedinasr commented 1 day ago

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

When keyboard is open in a card modal, dragging the modal down does not close the keyboard, causing a weird UI behavior.

https://github.com/user-attachments/assets/62f110ab-bd3e-4f08-a168-37ff8bb3a667

Expected Behavior

When keyboard is open in a card modal, dragging the modal down should close the keyboard.

Steps to Reproduce

  1. Open this stackblitz https://stackblitz.com/~/github.com/hedinasr/ion-card-modal-keyboard-bug with Safari (iOS)
  2. Open the modal
  3. Focus on the input to open the keyboard
  4. Drag the modal down

Code Reproduction URL

https://github.com/hedinasr/ion-card-modal-keyboard-bug

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/react 8.3.1

Capacitor:

Capacitor CLI : 6.1.2 @capacitor/android : 6.1.2 @capacitor/core : 6.1.2 @capacitor/ios : 6.1.2

Utility:

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

System:

NodeJS : v22.9.0 (/usr/local/Cellar/node/22.9.0_1/bin/node) npm : 10.8.3 OS : macOS Unknown

Additional Information

No response

aeharding commented 1 day ago

I believe this is a duplicate of https://github.com/ionic-team/ionic-framework/issues/23955#issuecomment-1821377765 - an onDragStart event for modal would allow developer to customize the behavior.