-
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
bug: sheet modal gesture breaks when interacting with inputs/keyboard on ios #23878
Comments
Thanks for the issue. Can you please provide reproductions for the buggy backdrop and the keyboard issues? |
Of course. Here is the Repo: https://github.com/EinfachHans/sheet-modal-bugs Just open the Modal, and move it in the states, the backdrop bug happens. Then tap into the input and tap out again. The Tested on Android 11 Galaxy 4 and iOS 14.7.1 (iPhone 11 Pro):
|
Thanks. Looks like the backdrop issue happens when the breakpoints do not range from 0 to 1 (you had I can reproduce the issue with the sheet not snapping, though I need to look into why that is happening. |
I would like to use the Sheet Modal for example single options, where the modal itself only contains one button. This should only have a specific height of for example 0.5, because expanding to 11 won't look really good. |
I think it would be better to set the height of the modal to <ion-modal [breakpoints]="[0, 1]">...</ion-modal> ion-modal {
height: 50%;
} The breakpoints for Can you try adjusting the height and let me know if that works? |
Oops sorry I meant |
Okay yes this works, but i mentioned something else: I guess in similar native setups there is kind of a bounce when you drag the modal. So basically you can drag the modal a bit higher as it is allowed to and if you release it snaps back. Now this feels very strict if you reached the 1 breakpoint |
Looks like the same issue as #22120 (impacts the card modal too) |
Yes correct! |
Some updates on this:
The above 4 fixes will be available in an upcoming Ionic v6 beta. The "bounce" you mentioned in #23878 (comment) will be tracked in #22120 since it also impacts card modals. I am going to convert this thread to focus on the remaining issue which is the sheet gesture breaking when Interacting with the keyboard/inputs. |
@liamdebeasi why is this removed from the 6.0.0 Milestone? Guess thats a major issue 🤔 |
We still have plans to fix, but the 6.0.0 milestone was outdated and not representative of what we are currently working on. |
@liamdebeasi FYI, looks like the Additional to that, i guess it would make sense to close open keyboards when start dragging by adjusting the canStart: const canStart = (detail: GestureDetail) => {
/**
* If the sheet is fully expanded and
* the user is swiping on the content,
* the gesture should not start to
* allow for scrolling on the content.
*/
const content = (detail.event.target! as HTMLElement).closest('ion-content');
if (currentBreakpoint === 1 && content) {
return false;
}
const activeElement = baseEl.ownerDocument!.activeElement as HTMLElement;
if (activeElement && activeElement.matches('input,ion-input, ion-textarea')) {
activeElement.blur();
}
return true;
}; |
Resolves #23878 Co-authored-by: EinfachHans <[email protected]>
Resolves #23878 Co-authored-by: EinfachHans <[email protected]>
Resolves #23878 Co-authored-by: EinfachHans <[email protected]>
Resolves #23878 Co-authored-by: EinfachHans <[email protected]>
…#24642) Resolves #23878 Co-authored-by: EinfachHans <[email protected]>
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prequisites
Ionic Framework Version
Current Behavior
I just tested the new Sheet Modal. First: Great work 🎉 Here is a Collections of things i mentioned:
breakpoints
orinitialBreakpoint
. Maybe missing in the angular component declaration?handle
can not be set to false for Sheet Modals:ionic-framework/core/src/components/modal/modal.tsx
Line 550 in 9fa373c
Bildschirmaufnahme.2021-09-06.um.13.27.54.mov
freeMode
would be a cool featureExpected Behavior
Everything is described above
Steps to Reproduce
Version:
6.0.0-beta.5
Code Reproduction URL
No response
Ionic Info
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: