nvda
dae61938 - Browse mode with auto focus focusable elements disabled: Fix activation of non-focusable objects and activation after using the tab key. (#11130)

Commit
5 years ago
Browse mode with auto focus focusable elements disabled: Fix activation of non-focusable objects and activation after using the tab key. (#11130) Previously, with auto focus focusable elements disabled, browse mode tracked the last focusable object and used this when activating at the caret. This meant that it wasn't possible to activate objects that weren't focusable. Furthermore, this wasn't updated correctly when using the tab key, which meant it wasn't possible to activate at the caret after tabbing. To fix this: 1. Don't keep track of the last focusable object. Instead, _focusLastFocusableObject always uses the focusable ancestor of the caret. 2. If _focusLastFocusableObject is requested to activate, it does so using the object at the caret, not the focusable ancestor. This handles the case where the object at the caret isn't focusable. 3. _focusLastFocusableObject temporarily saves the object which is pending focus. This is because we might be about to activate or pass through a key which will cause this object to change (e.g. checing a check box). However, we won't actually get the focus event until after the change has occurred. The speech property cache on this saved object reflects the properties before the activation. 4. When the focus event arrives, event_gainFocus uses this saved pending focus object to report the change (if any) that occurred.
Author
Parents
Loading