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
[iOS] Hold and drag spacebar does not move cursor when obscureText
is true.
#122139
Comments
Thanks for the report. Using code sample, I was able to replicate the reported behavior on latest versions. stable, master flutter doctor -v
|
CC @Renzo-Olivares from triage. Maybe we just have floating cursor disabled explicitly when obscureText is true for some reason? |
@justinmc I thought about that too, but it should be re-enabled when the state changes to |
This doesn't seem to work on native iOS if I'm not mistaken? CC @Renzo-Olivares. If I try to use floating cursor (hold and drag spacebar) in a native password field, it doesn't work for me (simulator). Does anyone see differently? |
I'm seeing this on the simulator (works on non obscured/ does not work on obscured): Screen.Recording.2023-03-23.at.4.52.19.PM.mov |
This comment was marked as duplicate.
This comment was marked as duplicate.
Alright since this doesn't even work on native, it will be low priority for Flutter to support it. But if we could without too much overhead, why not? I say keep this issue open in case anyone is inspired and wants to implement this. |
@justinmc I think that there might be a misunderstanding here. (It's possible it's on my side).
Emphasis on "before the TextField is focused". Note how on 0:53 of the video, though obscureText=true, you can scroll through the text because daniloapr unobscured the text before focusing on the text box. I think it makes sense to match the iOS behavior and not have the spacebar hold move the cursor when the text is obscured, but when you press the unobscure button I'd expect the spacebar hold to move the cursor. Current behavior: That still seems like a bug to me. I'd expect: |
Ah sorry about that, you're right now that I look more closely. Switching between obscured and unobscured should disabled and enabled the floating cursor. This likely is due to the engine not being informed of the change between obscured and not. This actually came up recently in one or two places (#122300). I think when that is fixed, this issue should be fixed as well. |
…t is true. (#40216) Fixes [flutter/flutter#122139](flutter/flutter#122139) with flutter pr [flutter/flutter#122383](flutter/flutter#122383)
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
TextFormField
orTextField
and setobscureText
totrue
as in the Code Sample belowExpected results:
Should be possible to move the cursor using the spacebar
Actual results:
obscureText
istrue
before the TextField is focused, the cursor does not moveobscureText
isfalse
before the TextField is focused, the cursor moves as expectedCode sample
Logs
screen-recording-2023-03-07-at-184801_WuxJXMV7.mp4
The text was updated successfully, but these errors were encountered: