Skip to content

Commit 43a22d0

Browse files
pfaffeDevtools-frontend LUCI CQ
authored andcommitted
Fix styles tab keyboad navigation failing to focus longhands
When focussing a shorthand value in the styles tab, stepping to the next property gets blocked if the shorhand tree element is folded, i.e., the corresponding longhands are not visible. In that case, the next property to get focussed is the invisible longhand, but the element cannot actually be focussed meaning stepping just stops. Bug: 396311936 Change-Id: I1cfde2bde4d7b9b6e51b7f407a194297873db58a Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6680978 Commit-Queue: Changhao Han <changhaohan@chromium.org> Reviewed-by: Changhao Han <changhaohan@chromium.org> Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
1 parent 5b9c371 commit 43a22d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

front_end/panels/elements/StylePropertiesSection.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,8 @@ export class StylePropertiesSection {
522522

523523
let focusNext: HTMLElement|null = null;
524524
const focusable =
525-
Array.from((this.propertiesTreeOutline.shadowRoot.querySelectorAll('[tabindex]') as NodeListOf<HTMLElement>));
525+
Array.from((this.propertiesTreeOutline.shadowRoot.querySelectorAll('[tabindex]') as NodeListOf<HTMLElement>))
526+
.filter(e => e.checkVisibility());
526527

527528
if (focusable.length === 0) {
528529
return;

0 commit comments

Comments
 (0)