forked from firka/flutter
Turn brieflyShowPassword back on on iOS (#157466)
Fixes https://github.com/flutter/flutter/issues/115359 This patch should restore the `brieflyShowPassword` behavior on iOS before https://github.com/flutter/flutter/pull/104335. On iOS new characters are still temporarily revealed if the user is entering using the software keyboard (potentially because it's easy to fat finger using on screen keyboards?).
This commit is contained in:
@@ -5357,10 +5357,8 @@ class EditableTextState extends State<EditableText> with AutomaticKeepAliveClien
|
||||
String text = _value.text;
|
||||
text = widget.obscuringCharacter * text.length;
|
||||
// Reveal the latest character in an obscured field only on mobile.
|
||||
// Newer versions of iOS (iOS 15+) no longer reveal the most recently
|
||||
// entered character.
|
||||
const Set<TargetPlatform> mobilePlatforms = <TargetPlatform> {
|
||||
TargetPlatform.android, TargetPlatform.fuchsia,
|
||||
TargetPlatform.android, TargetPlatform.fuchsia, TargetPlatform.iOS,
|
||||
};
|
||||
final bool brieflyShowPassword = WidgetsBinding.instance.platformDispatcher.brieflyShowPassword
|
||||
&& mobilePlatforms.contains(defaultTargetPlatform);
|
||||
|
||||
@@ -4980,7 +4980,7 @@ void main() {
|
||||
await tester.pump(const Duration(milliseconds: 500));
|
||||
await tester.pump(const Duration(milliseconds: 500));
|
||||
expect((findRenderEditable(tester).text! as TextSpan).text, '•••');
|
||||
});
|
||||
}, variant: const TargetPlatformVariant(<TargetPlatform>{ TargetPlatform.iOS, TargetPlatform.android, TargetPlatform.fuchsia, }));
|
||||
|
||||
group('a11y copy/cut/paste', () {
|
||||
Future<void> buildApp(MockTextSelectionControls controls, WidgetTester tester) {
|
||||
|
||||
Reference in New Issue
Block a user