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
[iOS] Textfield loses focus after 'Shake to undo' system dialog, despite keyboard reappears. #150522
changed the title [-][iOS] Textfield looses focus after 'Shake to undo' system dialog, despite keyboard reappears.[/-][+][iOS] Textfield loses focus after 'Shake to undo' system dialog, despite keyboard reappears.[/+]on Jun 19, 2024
@AlexChechetkin-LXC Thanks for the report. Shake to undo feature in iOS is a TIL moment for me thanks to your issue, but it seems Flutter doesn't support yet that feature looking at #34749 which is open and hence you are seeing the reported behavior. I suggest you to follow-up in it for further updates.
Will close this as a duplicate. If you disagree, write in comments and I'll reopen it.
@darshankawar, With current behavior - when textfield doesn't have a focus, but system keyboard is open and could not be closed by tapping on the empty screen space, flutter app is in inconsistent state and is broken.
This is not a feature support request, but a bug in core component, affecting all iOS users.
This is not a feature support request, but a bug in core component, affecting all iOS users.
Thanks for the feedback. Yes, I am aware that your issue report isn't a feature request, but my view was that since the linked issue is open, the shake to undo feature may not have been implemented in Flutter yet and hence the behavior you are seeing.
But I'll reopen this issue and label this for team's attention, as I was able to replicate the reported behavior.
I think this is something that Flutter is trying to support, via UndoManager. In #34749 (comment)@Renzo-Olivares mentions that he sees an undo prompt after doing the shake gesture, but it doesn't actually undo the text. Maybe due to the field losing focus.
This may be related to #148984 (almost ended up cherry picked but it was closed in #148976).
@AlexChechetkin-LXC Were you on stable when you tried this? Can you try on master?
This issue is reproducible with any native dialog appearing, not just with 'shake to undo'.
For example opening native file picker dialog (file_picker package), while textfield in focus, leads to the same inconsistent app state.
Still reproducible on Flutter 3.38.3 (stable). Workaround: on iOS when primary focus leaves every EditableText send TextInput.clearClient + TextInput.hide via SystemChannels.textInput
Reacted by Maxim Kuzin, Boris Kastner, Edgar Rakhmankulov and Konstantin Gorynin
Activity
[-][iOS] Textfield looses focus after 'Shake to undo' system dialog, despite keyboard reappears.[/-][+][iOS] Textfield loses focus after 'Shake to undo' system dialog, despite keyboard reappears.[/+]darshankawar commentedon Jun 20, 2024
@AlexChechetkin-LXC Thanks for the report.
Shake to undofeature in iOS is a TIL moment for me thanks to your issue, but it seems Flutter doesn't support yet that feature looking at #34749 which is open and hence you are seeing the reported behavior. I suggest you to follow-up in it for further updates.Will close this as a duplicate. If you disagree, write in comments and I'll reopen it.
AlexChechetkin-LXC commentedon Jun 24, 2024
@darshankawar, With current behavior - when textfield doesn't have a focus, but system keyboard is open and could not be closed by tapping on the empty screen space, flutter app is in inconsistent state and is broken.
This is not a feature support request, but a bug in core component, affecting all iOS users.
darshankawar commentedon Jun 25, 2024
Thanks for the feedback. Yes, I am aware that your issue report isn't a feature request, but my view was that since the linked issue is open, the
shake to undofeature may not have been implemented in Flutter yet and hence the behavior you are seeing.But I'll reopen this issue and label this for team's attention, as I was able to replicate the reported behavior.
1 remaining item
justinmc commentedon Jun 27, 2024
I think this is something that Flutter is trying to support, via UndoManager. In #34749 (comment) @Renzo-Olivares mentions that he sees an undo prompt after doing the shake gesture, but it doesn't actually undo the text. Maybe due to the field losing focus.
This may be related to #148984 (almost ended up cherry picked but it was closed in #148976).
@AlexChechetkin-LXC Were you on stable when you tried this? Can you try on master?
Lamda303 commentedon Jul 2, 2024
This may be related to #140508
wdcs-vivekmakvana commentedon Jul 10, 2024
Workaround solution : Add force stop shake to edit for iOS only. Add below code in AppDelegate.swift file.
UIApplication.shared.applicationSupportsShakeToEdit = falseAlexChechetkin-LXC commentedon Nov 8, 2024
This issue is reproducible with any native dialog appearing, not just with 'shake to undo'.
For example opening native file picker dialog (file_picker package), while textfield in focus, leads to the same inconsistent app state.
chad-bekmezian-snap commentedon Nov 27, 2024
This really could use a fix
artyom-froloff commentedon Sep 29, 2026
Still reproducible on Flutter 3.38.3 (stable). Workaround: on iOS when primary focus leaves every
EditableTextsendTextInput.clearClient+TextInput.hideviaSystemChannels.textInput