fix: prevent special key buttons from stealing focus
- Add tabIndex={-1} to all special key buttons to prevent focus
- Add onFocus handler to immediately blur if focused
- Terminal focus stays intact when tapping special keys
This commit is contained in:
@@ -62,7 +62,9 @@ export const SpecialKeysPanel: React.FC<SpecialKeysPanelProps> = ({
|
||||
key={key}
|
||||
className="special-key-button"
|
||||
onPointerDown={(e) => handlePointerDown(e, key)}
|
||||
onFocus={(e) => e.target.blur()}
|
||||
type="button"
|
||||
tabIndex={-1}
|
||||
>
|
||||
{label}
|
||||
</button>
|
||||
@@ -75,7 +77,9 @@ export const SpecialKeysPanel: React.FC<SpecialKeysPanelProps> = ({
|
||||
key={key}
|
||||
className="special-key-button"
|
||||
onPointerDown={(e) => handlePointerDown(e, key)}
|
||||
onFocus={(e) => e.target.blur()}
|
||||
type="button"
|
||||
tabIndex={-1}
|
||||
>
|
||||
{label}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user