obscureText and Long Press

33 views
Skip to first unread message

dan....@stonebridgeprojects.com

unread,
Feb 10, 2019, 12:43:43 PM2/10/19
to Flutter Dev
Hi,

Rank amateur here, so please forgive naive questions.

I am using TextEditingController for text fields in a MaterialApp app. If I set obscureText to false or remove it, I can cut, copy and paste in my text fields.  When I set obscureText to true, however, the text fields don't seem to respond to a long press and so I cannot cut, copy or paste. Is this expected behaviour?  If not, any suggestions as to what I might be doing wrong?

Here is my version info:

$ flutter --version
Flutter 1.1.8 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 985ccb6d14 (5 weeks ago) • 2019-01-08 13:45:55 -0800
Engine • revision 7112b72cc2
Tools • Dart 2.1.1 (build 2.1.1-dev.0.1 ec86471ccc)

Thanks very much for your help.

-Dan

Andrea Salvatore

unread,
Feb 10, 2019, 1:04:50 PM2/10/19
to dan....@stonebridgeprojects.com, Flutter Dev
Hello Dan,

I think it's the expected behaviour. You are not supposed to copy and paste obscured passwords for example ;)

Cheers,
Andrea

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

dan....@stonebridgeprojects.com

unread,
Feb 10, 2019, 1:41:24 PM2/10/19
to Flutter Dev
Thanks, Andrea.  I see what you mean about copying obscured values, but it is often possible to paste into obscured fields.  Google's login, for example, allows paste to the password field.  I guess the answer in this case comes down to what the Flutter designers intended.

-Dan

Ian Hickson

unread,
Feb 10, 2019, 11:09:17 PM2/10/19
to dan....@stonebridgeprojects.com, Flutter Dev
Yeah we should allow paste. Please file a bug!
--

--
Ian Hickson

😸

dan....@stonebridgeprojects.com

unread,
Feb 10, 2019, 11:28:07 PM2/10/19
to Flutter Dev
Thanks, Ian.  Will do.

-Dan

dan....@stonebridgeprojects.com

unread,
Feb 10, 2019, 11:40:43 PM2/10/19
to Flutter Dev
Seems to have been reported already: #27353.

-Dan
Reply all
Reply to author
Forward
0 new messages