-
Notifications
You must be signed in to change notification settings - Fork 6k
Flutter iOS Interactive Keyboard: Handle Pointer Up #44457
Conversation
| } | ||
|
|
||
| - (void)hideKeyboardWithoutAnimation { | ||
| - (void)hideKeyboardWithoutAnimationAndCursorNotDismissed:{ |
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.
nit: ...AndAvoidCursorDismissUpdate
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!
| @property(nonatomic, readonly) CATransform3D editableTransform; | ||
| @property(nonatomic, assign) CGRect markedRect; | ||
| // Disables the cursor from dismissing when firstResponder is resigned | ||
| @property(nonatomic, assign) BOOL resignFirstResponderCallTempDisabled; |
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.
Nit: preventCursorDismissWhenResignFirstResponder
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 as well!
hellohuanlin
left a comment
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 very clean. Just some nits
| UIScreen* screen = _viewController.flutterScreenIfViewLoaded; | ||
| CGFloat screenHeight = screen.bounds.size.height; | ||
| CGFloat keyboardHeight = _keyboardRect.size.height; | ||
| BOOL pointerBelowMiddleY = (screenHeight - (keyboardHeight / 2)) < pointerY; |
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.
I would name this shouldDismissKeyboard or shouldHideKeyboard or similar. Ideally describe the intent of the variable rather than how it's computed (which is already on the right-hand side here).
cbracken
left a comment
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 - just one nit.
…132159) flutter/engine@dd03fae...934ebb0 2023-08-08 [email protected] Roll Skia from 6fa6fdd04783 to 5c8c7faf9131 (3 revisions) (flutter/engine#44506) 2023-08-08 [email protected] Flutter iOS Interactive Keyboard: Handle Pointer Up (flutter/engine#44457) 2023-08-08 [email protected] [Impeller] improved glyph hashing performance (flutter/engine#44502) 2023-08-08 [email protected] Roll Skia from 30c0319e7e42 to 6fa6fdd04783 (2 revisions) (flutter/engine#44503) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR address the movement aspect of the flutter interactive keyboard. It handles pointer up while a scroll view widget is visible, and the interactive behavior is chosen for keyboardDismissBehavior. This is a desired behavior of the keyboard that has not yet been implemented. Design Document: https://docs.google.com/document/d/1-T7_0mSkXzPaWxveeypIzzzAdyo-EEuP5V84161foL4/edit?pli=1 Issues Address: flutter/flutter#57609 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This PR address the movement aspect of the flutter interactive keyboard. It handles pointer up while a scroll view widget is visible, and the interactive behavior is chosen for keyboardDismissBehavior. This is a desired behavior of the keyboard that has not yet been implemented.
Design Document:
https://docs.google.com/document/d/1-T7_0mSkXzPaWxveeypIzzzAdyo-EEuP5V84161foL4/edit?pli=1
Issues Address:
flutter/flutter#57609
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.