File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,9 @@ export function ConnectDevice({
112112 className = "bg-blue-500 text-white p-2 rounded-md"
113113 onClick = { onClick }
114114 onKeyDown = { ( e ) => {
115- e . preventDefault ( ) ;
115+ if ( e . key !== "Tab" ) e . preventDefault ( ) ;
116116 } }
117+ tabIndex = { - 1 }
117118 >
118119 { device ? `${ device . productName } Connected` : "Connect Device" }
119120 </ button >
Original file line number Diff line number Diff line change @@ -128,12 +128,21 @@ const Game = () => {
128128 onDisconnect = { onDeviceDisconnect }
129129 device = { device }
130130 />
131- < div style = { { width : "100%" , height : "100%" , position : "relative" } } >
131+ < div
132+ style = { {
133+ width : "100%" ,
134+ height : "100%" ,
135+ position : "relative" ,
136+ display : "flex" ,
137+ } }
138+ >
132139 < div
133140 ref = { containerRef }
134141 id = "game-container"
135142 className = "game-container"
136143 style = { { width : "100%" , height : "100%" } }
144+ tabIndex = { 0 }
145+ onClick = { ( ) => containerRef . current ?. focus ( ) }
137146 />
138147 </ div >
139148 </ div >
You can’t perform that action at this time.
0 commit comments