-
Notifications
You must be signed in to change notification settings - Fork 6k
Flutter iOS Interactive Keyboard: Fixing Behavior Issue #44586
Conversation
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.
Just some nits
| [self showKeyboardAndRemoveScreenshot]; | ||
| if (_keyboardView.superview != nil) { | ||
| // Done to avoid the issue of a pointer up done without a screenshot | ||
| // View must be loaded at this point. |
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: space
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.
Fixed!
| CGFloat keyboardHeight = _keyboardRect.size.height; | ||
| // Negative velocity indicates a downward movement | ||
| BOOL shouldDismissKeyboardBasedOnVelocity = _pointerYVelocity < 0; | ||
| [UIView animateWithDuration:0.3f |
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.
can you make it a constant at the top of file?
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.
Definitely, added a description as well.
| } else { | ||
| [self setKeyboardContainerHeight:pointerY]; | ||
| _pointerYVelocity = _previousPointerYPosition - pointerY; | ||
| NSLog(@"%f", _pointerYVelocity); |
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.
remove this
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.
Slipped by me. Will remove right away!
…132328) flutter/engine@ea7730c...a9be77e 2023-08-10 [email protected] Flutter iOS Interactive Keyboard: Fixing Behavior Issue (flutter/engine#44586) 2023-08-10 [email protected] [Impeller] Flutter GPU: Add context override. (flutter/engine#44566) 2023-08-10 [email protected] [Impeller] External OpenGLES texture sampling. (flutter/engine#44559) 2023-08-10 [email protected] Roll Fuchsia Linux SDK from 961_tJawsbLMdy5i0... to konJQZKk2qXc276iA... (flutter/engine#44593) 2023-08-10 [email protected] Roll Skia from 364900538771 to 92e6f52b0fa8 (1 revision) (flutter/engine#44592) 2023-08-10 [email protected] Roll Skia from f39fd2de8f10 to 364900538771 (1 revision) (flutter/engine#44590) Also rolling transitive DEPS: fuchsia/sdk/core/linux-amd64 from 961_tJawsbLM to konJQZKk2qXc 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 addresses an issue with the behavior of the keyboard. Originally the behavior of the keyboard was to see if the pointer was above or below the middle of the keyboards full size and then animate appropriately. However we found that the behavior is instead based on velocity. This PR adjust the code to match this behavior. 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 addresses an issue with the behavior of the keyboard. Originally the behavior of the keyboard was to see if the pointer was above or below the middle of the keyboards full size and then animate appropriately. However we found that the behavior is instead based on velocity. This PR adjust the code to match this behavior.
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.