Closed georgealways closed 1 week ago
I wanted to give an update here as I think I've been acting on a few false positives regarding this behavior across different threads.
Reading back my approach above, it feels like this has led to more complexity than is warranted. In the next release, there will still be no user control over this behavior.
Controllers will ALWAYS capture key events. Folder titles will NEVER capture key events.
I can't think of a reasonable use case where you'd want to control your app via keyboard while simultaneously typing in a controller. Folders should not (and AFAICT did not) ever capture your keystrokes.
Adds a
captureKeys
flag to GUI's constructor, which is true by default. If this is false, GUI will not callstopPropagation()
on key events that originate from within the GUI. The user must then manage event propagation manually using something like the following:The reason for this change is to have uniform behavior between Controllers and folder titles: they both respect
captureKeys
the same way. Of course, you can disable this behavior with{ captureKeys: false }
, but then you must manage all events yourself as shown above.For tests: expanded the browser shim to simulate event propagation.