From c8f27e46def1f1b7ab15672507880a3c30f5fb5b Mon Sep 17 00:00:00 2001 From: Matt Hillsdon Date: Wed, 24 Jun 2026 14:39:57 +0100 Subject: [PATCH] fix: scope passive block focus to keyboard navigation The passive-focus selector for blocks and connection paths lacked the .blocklyKeyboardNavigation gate that the sibling field and icon selectors in the same rule already have, so passive block outlines leaked into mouse-only usage. It also never honored the dropdown/widget-div guard its own comment promised. Scope it identically to the field/icon selectors. Closes #10062 --- packages/blockly/core/css.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/blockly/core/css.ts b/packages/blockly/core/css.ts index e3ff51bd5e9..94b737ed2e8 100644 --- a/packages/blockly/core/css.ts +++ b/packages/blockly/core/css.ts @@ -571,6 +571,12 @@ input[type=number] { /* Passive focus cases: */ /* Blocks with passive focus except when widget/dropdown div in use. */ +.blocklyKeyboardNavigation:not( + :has( + .blocklyDropDownDiv:focus-within, + .blocklyWidgetDiv:focus-within + ) + ) .blocklyPassiveFocus:is( .blocklyPath:not(.blocklyFlyout .blocklyPath), .blocklyHighlightedConnectionPath