Skip to content

Commit 429b05e

Browse files
committed
no cursor pointer while chat has focus
1 parent 0805c2f commit 429b05e

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/main/client/src/component/Chat.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ export const Chat = ({chatId, className}) => {
134134
<input
135135
className="w-full px-1 py-1 border border-gray-500 bg-stone-800 text-stone-100 focus:outline-none"
136136
type="text"
137+
id="chat-input"
137138
name="message"
138139
/>
139140
</form>

src/main/client/src/feature/game/Game.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ function Board({gameState, setGameState}) {
123123

124124
useEffect(() => {
125125
let onKeyDown = (e) => {
126+
let activeElement = window.document.activeElement
127+
if (activeElement?.id === "chat-input") {
128+
return
129+
}
126130
if (e.ctrlKey || e.shiftKey) {
127131
setCtrlKeyDown(true)
128132
}

0 commit comments

Comments
 (0)