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
[SuperEditor] Show software keyboard upon tap (Resolves #1816) #1978
Conversation
My initial thought is that if the Android gesture interactor only needs to be able to open the keyboard, then we probably shouldn't pass in a whole controller. In general, any API that you expose to an object will eventually be used by that object, even if not strictly necessary. So we should be careful when passing things around like that. Is there any reason that we need to pass a whole controller instead of just a callback method?
I didn't follow the rationale there. Why do we want to remove it?
Which implementation? Is there a behavior that's expected on iOS that we currently aren't honoring on iOS? |
No particular reason. We can pass just a callback if needed.
If we will always show the keyboard upon tap, showing the keyboard also when selection changes might be unnecessary.
I mean to show the keyboard upon tap |
Ok, let's do that.
Do we have existing policies related to focus change, or programmatic placing of the caret, which would be impacted by that?
Yeah, I suppose we should duplicate that change. |
@matthew-carroll Updated the implementation.
After checking again I think we shouldn't remove that, since it's configurable via policies. |
@@ -1315,6 +1315,41 @@ Paragraph two | |||
}); | |||
}); | |||
|
|||
testWidgetsOnMobile('shows software keyboard when tapping at the selected position', (tester) async { |
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.
Please change this to "opens software keyboard when tapping on caret"
Also, should there be a test for an expanded selection?
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.
Updated.
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.
LGTM
[SuperEditor] Show software keyboard upon tap. Resolves #1816
Steps to reproduce:
After that, the software keyboard isn't shown.
The reason is that we show the software keyboard when selection changes. Because the selection didn't change, the software keyboard isn't show.
This PR forwards
SoftwareKeyboardController
to the Android touch interactor so it can show the keyboard upon tap.I couldn't reproduce this on iOS because I didn't find any system button to close the keyboard. We have an above-the-keyboard panel button to close the keyboard, but in reality we are closing the IME connection when tapping on it. I noticed that Flutter doesn't expose a method to close the software keyboard, so it's probably a good idea to file an issue for that.
Open questions: