Repository navigation
SelectionArea does not vibrate on Android #104551
Copy link
Copy link
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: selectionSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsfound in release: 3.1Found to occur in 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Description
When I select text on my Android, for every single character my phone vibrates. I tried to show it my video. If you make the sounds really loud, you can hear the vibrations a bit.
IMG_0020.MOV
I would expect the behavior for the SelectionArea in my Flutter App.
I used Pixel 4a with Android 12.
I also tried it on my iPhone 13 but there are no vibration when selecting text in a native iOS (but I'm also not 100% sure if I maybe disabled it - if it's possible)
My app
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This example shows how to make a screen selectable..
import 'package:flutter/material.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
// You need to add the "SelectionArea" to make the text selectable.
home: SelectionArea(
child: Scaffold(
body: Padding(
padding: const EdgeInsets.all(16),
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Text(
'Fast',
style: Theme.of(context).textTheme.titleLarge,
),
const Text(
'Flutter code compiles to ARM or Intel machine code as well as JavaScript, for fast performance on any device.',
),
ElevatedButton(
onPressed: () {},
child: const Text('Try it in DartPad'),
)
],
),
),
),
),
),
);
}
}cc: @chunhtai
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listf: selectionSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsSelectableRegion, SelectionArea, SelectionContainer, Selectable, and related APIsfound in release: 3.1Found to occur in 3.1Found to occur in 3.1frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer versionIssue is closed as already fixed in a newer version
Activity
chunhtai commentedon May 24, 2022
there is also a magnify glass when you select text in Android as well. Yes this is also in my radar.
cc @justinmc this may also apply to text field and the magnify glass project
nilsreichardt commentedon May 24, 2022
Indeed. Didn't notice it 😅 I will create a separate issue to track this better 👍
nilsreichardt commentedon May 24, 2022
@justinmc Do you know if there are already open tickets for these two behaviors? We need one ticket for the magnifying glass and one for the vibrations when selecting. I tested it and the
TextFielddoes not have both. If there are no tickets, let me know - I can then create two tickets.nilsreichardt commentedon May 25, 2022
For the magnifying glass I found the ticket #17617 👍
exaby73 commentedon May 25, 2022
I am able to reproduce this on the current version of master. Along with that, selection on Android is very buggy as seen in the video below.
Note: this was tested using a production build (
flutter build web) of the sample codeand served locally using
python3 -m http.server --directory build/web.Video showing buggy selection
Screenrecording_20220525_193541.mp4
Code sample
flutter doctor -v(Master)nilsreichardt commentedon May 25, 2022
@exaby73 Great catch! Should we extract this into a separate issue?
markusaksli-nc commentedon May 25, 2022
FYI #104603 and #104620 @nilsreichardt
justinmc commentedon May 25, 2022
@nilsreichardt There's also another magnifying glass issue for iOS: #9507.
I'm not aware of any issues about the vibration thing.
nilsreichardt commentedon May 25, 2022
@justinmc Good to know, thanks!
Great, I created two issues:
TextFieldshould vibrate when moving the cursor on Android #104639TextFieldshould vibrate when changing the selection on Android #104640github-actions commentedon Dec 5, 2022
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
flutter doctor -vand a minimal reproduction of the issue.