Focus Traversal on macOS

64 vistas
Ir al primer mensaje no leído

Tom Verbeek

no leída,
14 ene 2020, 3:59:29 a.m.14/1/2020
para Desktop Embedding for Flutter
When creating a new flutter desktop app with a few text input fields, keyboard driven focus traversal works pretty well: Hitting TAB or SHIFT-TAB switches the focus forward and backward over the editable fields.

However in our current project focus traversal is broken: TAB does not move the focus any longer on macOS. We are always on the current Flutter Master Channel.
Since I cannot reproduce this problem with a simple test app, I won't report an issue yet.

How does focus traversal on the Desktop work? Are there any requirements other than simply adding focusable fields? How does flutter determine the order of focus traversal?

Stuart Morgan

no leída,
14 ene 2020, 10:23:09 a.m.14/1/2020
para Tom Verbeek,Desktop Embedding for Flutter
See https://api.flutter.dev/flutter/widgets/FocusNode-class.html and some of the referenced classes for information about focus traversal behavior and policies.

If you're able to distill the issue in your app down to a test case that you can share, definitely do file a Flutter issue.

-Stuart

--
You received this message because you are subscribed to the Google Groups "Desktop Embedding for Flutter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-desktop-embe...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flutter-desktop-embedding-dev/0db3a563-3c39-4a89-8611-0a0a1b6f327d%40googlegroups.com.

Tom Verbeek

no leída,
16 ene 2020, 3:53:28 a.m.16/1/2020
para Desktop Embedding for Flutter
Stuart,

thanks for the link. However I am still missing, whether focus traversal should work implicitly without the need to do use specialized API (as described in the FocusNode documentation). I believe so, since a minimalistic new app does have focus traversal, but with our app is stopped working some time ago.

So, there must be something we do, that renders the default focus traversal ineffective.

Tom Verbeek

no leída,
28 ene 2020, 3:28:51 a.m.28/1/2020
para Desktop Embedding for Flutter
I can now reproduce the problem: Focus traversal works perfectly in my app until the point where the user opens the file chooser from the File Chooser plugin from the Desktop Embedding Project by triggering it with the keyboard (if triggered by mouse-clicking focus traversal continues to work)
Would that be a bug in the plugin or in the main Flutter project?

Stuart Morgan

no leída,
28 ene 2020, 12:09:44 p.m.28/1/2020
para Tom Verbeek,Desktop Embedding for Flutter
It's very likely a variant of the stuck keys problem that we've encountered before, so a bug in Flutter. The way key events are managed on desktop will likely be changing substantially, partially due to issues like this, but it would be good to file a bug with a simple test case so that we can make sure the redesign addresses this case as well as the existing known issues.

If it is in fact a stuck key, you could probably work around it in the meantime by invoking the file chooser on a very slight delay, or potentially even by ensuring that it's opened on key-up instead of key-down.

-Stuart

On Tue, Jan 28, 2020 at 12:28 AM Tom Verbeek <techn...@gmail.com> wrote:
I can now reproduce the problem: Focus traversal works perfectly in my app until the point where the user opens the file chooser from the File Chooser plugin from the Desktop Embedding Project by triggering it with the keyboard (if triggered by mouse-clicking focus traversal continues to work)
Would that be a bug in the plugin or in the main Flutter project?

--
You received this message because you are subscribed to the Google Groups "Desktop Embedding for Flutter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-desktop-embe...@googlegroups.com.

Tom Verbeek

no leída,
11 feb 2020, 5:49:10 a.m.11/2/2020
para Desktop Embedding for Flutter
I finally found the time to write a simple example that demonstrates the bug and filed it here: https://github.com/flutter/flutter/issues/50553
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos