Skip to content

Commit b6189dd

Browse files
committed
fix: disable focusing main editor tabs on click
We need to re-enable this for accessibility, but see comments for an issue that must be resolved first.
1 parent 5d4ee20 commit b6189dd

File tree

1 file changed

+11
-0
lines changed
  • packages/scratch-gui/src/components/gui

1 file changed

+11
-0
lines changed

packages/scratch-gui/src/components/gui/gui.jsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,17 @@ const GUIComponent = props => {
294294
selectedTabClassName={tabClassNames.tabSelected}
295295
selectedTabPanelClassName={tabClassNames.tabPanelSelected}
296296
onSelect={onActivateTab}
297+
298+
// TODO: focusTabOnClick should be true for accessibility, but currently conflicts
299+
// with nudge operations in the paint editor. We'll likely need to manage focus
300+
// differently within the paint editor before we can turn this back on.
301+
// Repro steps:
302+
// 1. Click the Costumes tab
303+
// 2. Select something in the paint editor (say, the cat's face)
304+
// 3. Press the left or right arrow key
305+
// Desired behavior: the face should nudge left or right
306+
// Actual behavior: the Code or Sounds tab is now focused
307+
focusTabOnClick={false}
297308
>
298309
<TabList className={tabClassNames.tabList}>
299310
<Tab className={tabClassNames.tab}>

0 commit comments

Comments
 (0)