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
[Desktop]: Cannot input space if TextField is inside ListTile. #90907
Comments
Thanks for the report. I see the same behavior and seems to be specific to desktop platform, as the same behavior occurs on macOS too, but works as expected on other platforms like mobile and web. Verified on latest stable and master, running the code sample on Windows and macOS desktops, and we are unable to add space using spacebar while inputing text.
flutter doctor -v
|
CC @justinmc |
This is a regression caused by #80756 CC @dkwingsmt. I could fix it by adding a DoNothingAndStopPropagationIntent for spaces on desktop, but that seems like a bandaid (here): SingleActivator(LogicalKeyboardKey.space): DoNothingAndStopPropagationTextIntent(), Do we need to do some kind of check to only invoke the ActivateIntent if a field is not currently focused? Or any other way? |
@justinmc Can you illustrate what of the change caused the regression? |
@dkwingsmt If I comment out this line and run it on a Mac then the bug is gone: flutter/packages/flutter/lib/src/widgets/app.dart Line 1213 in 0272047
Maybe there's some small difference between LogicalKeySet and SingleActivator? |
Actually @LongCatIsLooong maybe your refactor #90684 will coincidentally fix this? Maybe then the Actions in the EditableText will receive the space before the ListTile does. |
If I'm understanding the issue correctly, that pull request does not change the current predefined shortcuts for text fields so it probably won't fix this issue. I think this happens because |
cc @dkwingsmt |
I just double checked my accusation of #80756 just to make sure, and I confirmed that the problem starts there, but I found that it's weirdly sporadic. When I checkout the merge commit b8833af, then the bug appears consistently like it does on master. When I checked out b8833af^ though, the bug can also still happen sometimes: Screen.Recording.2021-10-01.at.3.58.18.PM.mov |
I opened a proposal PR to get the discussion going on one way of fixing this: #91129 Please read the code and description and let me know what you think! If we decide to go this way then I'll write tests and move it out of draft mode. |
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 |
Steps to Reproduce
Expected results:
"Test Typing wow"
Actual results:
"TestTypingwow"
The text was updated successfully, but these errors were encountered: