You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ScrollView.keyboardDismissBehavior doesn't unfocus the keyboard properly #103544
Put keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag in a SingleChildScrollView, which has TextField among the children.
Tap on the TextField to focus on it.
Dismiss the keyboard by scrolling the page
Open the drawer
Expected results:
When the drawer is opened, keyboard stays there
Actual results:
Keyboard pops out
IMG_4871.mp4
Similar Issue #54277: This gives the solution to dismiss the keyboard properly, and I think the proper way of dismissing it is not applied on SingleChildScrollView's .onDrag code.
@Shawn-sudo
Thanks for the report. Running your code sample on latest stable (3.0), I observed that when textfield is in focus, the keyboard opens as below:
And when we open drawer, the textfield becomes inactive as you can see in the background, it has greyed out and hence the keyboard closes.
which I think is an expected behavior. What exactly should be the expected result from your end ? Does the same occur in native iOS app if you could check and confirm ?
@darshankawar Oh did you scroll the page before opening the drawer? Cause it happened to me only when I 1. open the keyboard 2. close the keyboard by scrolling the SingleChildScrollView (which has keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag) 3. And then open the drawer
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
darshankawar commentedon May 12, 2022
@Shawn-sudo
Thanks for the report. Running your code sample on latest stable (3.0), I observed that when textfield is in focus, the keyboard opens as below:
And when we open drawer, the textfield becomes inactive as you can see in the background, it has greyed out and hence the keyboard closes.
which I think is an expected behavior. What exactly should be the expected result from your end ? Does the same occur in native iOS app if you could check and confirm ?
Shawn-sudo commentedon May 13, 2022
@darshankawar Oh did you scroll the page before opening the drawer? Cause it happened to me only when I 1. open the keyboard 2. close the keyboard by scrolling the
SingleChildScrollView(which haskeyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag) 3. And then open the drawerdarshankawar commentedon May 13, 2022
I can't scroll using the code sample you provided. Please provide complete code sample that shows the behavior.
Shawn-sudo commentedon May 13, 2022
Umm Just put
Columnunder theSingleChildScrollViewadd a bunch ofSizedBox(height: 10000)under theColumn.darshankawar commentedon May 13, 2022
See if this issue is similar to your case #57609
Shawn-sudo commentedon May 13, 2022
I think #57609 is different from what I'm talking about, but I think it would solve this issue in a broad way. Thx
github-actions commentedon May 30, 2022
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Fix incorrect behavior of ScrollViewKeyboardDismissBehavior.onDrag fo…