-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
fix(modal): native keyboard will dismiss when bottom sheet is dragged #24642
Conversation
Resolves #23878 Co-authored-by: EinfachHans <[email protected]>
@sean-perkins amazing!! Looks good so far 😊 Dev build would be awesome to test it in a dev app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, nice work 👍
@EinfachHans The dev build version is i.e.: npm i @ionic/[email protected] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sean-perkins works as expected! 😊
/* tslint:disable-next-line */ | ||
if (typeof document !== 'undefined') { | ||
const activeElement = baseEl.ownerDocument.activeElement as HTMLElement; | ||
if (activeElement.matches('input,ion-input,textarea,ion-textarea')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I am a bit late but why don't we focus the ion-modal
instead? If someone is using contenteditable
this is still going to break.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
The swipe gesture for the modal bottom sheet will trigger when a form element (input, textarea, etc.) receives focus and opens the native keyboard. This causes the sheet gesture to become unresponsive and free scroll.
Issue Number: Resolves #23878
What is the new behavior?
Does this introduce a breaking change?
Other information
modal-sheet-before.mp4
modal-sheet-after.mp4
Behavior is easier to feel on device than from a video:
<ion-input></ion-input>
for each item