Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(modal): dismiss keyboard on drag card modal #30020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hedinasr wants to merge 1 commit into ionic-team:main
base: main
Choose a base branch
Loading
from hedinasr:main

Conversation

@hedinasr
Copy link

@hedinasr hedinasr commented Nov 14, 2024

Issue number: resolves #30019


What is the current behavior?

Dragging a card modal on iOS while the keyboard is open does not close the keyboard.

What is the new behavior?

Dragging a card modal closes the keyboard.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Before After
ScreenRecording_11-14-2024.13-51-10_1.mov
Simulator.Screen.Recording.-.iPhone.16.-.2024年11月14日.at.14.54.03.mp4

Copy link

vercel bot commented Nov 14, 2024
edited
Loading

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 2:20pm

Copy link
Contributor

This is a breaking change for my use case, where users desire the keyboard to remain present.

A better solution would be adding onDragStart event to modal so developers can customize behavior - see: #23955 (comment)

Copy link
Author

@aeharding actually, this is exactly the same behavior as the sheet modal; which closes the keyboard on drag. Can you show me an example of your use case?

Copy link
Contributor

@aeharding actually, this is exactly the same behavior as the sheet modal; which closes the keyboard on drag. Can you show me an example of your use case?

For example, iOS mail, if you pull down an email slightly the keyboard stays visible.

Copy link
Author

hedinasr commented Nov 18, 2024
edited
Loading

@aeharding do you think that we can add a prop to conditionally activate this feature? Like having a dimissKeyboard boolean prop? I can implement the feature here.

Copy link
Member

ShaneK commented Aug 1, 2025
edited
Loading

Hey! Thanks for the PR! I think I do agree with @aeharding here that this may not be desired behavior. As he suggested on the linked issue (and here), I think we'd prefer an event be emitted on drag start/end so developers can rig up their own event handling to do what they want - in your case, dismiss the keyboard.

I wouldn't even be opposed to this just being an optional property to enable keyboard dismiss on drag, but I still think an event being emitted on drag events would be a much nicer way to go

@ShaneK ShaneK added the needs: reply the issue needs a response from the user label Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@christian-bromann christian-bromann Awaiting requested review from christian-bromann christian-bromann is a code owner automatically assigned from ionic-team/framework

@ShaneK ShaneK Awaiting requested review from ShaneK

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

needs: reply the issue needs a response from the user package: core @ionic/core package

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

AltStyle によって変換されたページ (->オリジナル) /