-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Scroll to selection after keyboard opened #285
Scroll to selection after keyboard opened #285
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #285 +/- ##
==========================================
- Coverage 87.71% 87.45% -0.27%
==========================================
Files 64 64
Lines 10416 11363 +947
==========================================
+ Hits 9136 9937 +801
- Misses 1280 1426 +146 ☔ View full report in Codecov by Sentry. |
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 have a question (+ a typo to fix)
@@ -1474,6 +1474,7 @@ class RawEditorState extends EditorState | |||
if (_hasFocus) { | |||
// Listen for changing viewInsets, which indicates keyboard showing up. | |||
WidgetsBinding.instance.addObserver(this); | |||
_lastBottomViewInset = View.of(context).viewInsets.bottom; |
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.
Isn't this redundant with didChangeMetrics
?
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.
We are not receiving view inset changes while editor is unfocused. In order to have the latest bottom view inset we are fetching it when editor gained focus.
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!
Thanks!
Fixes #280.