fix: 로그인 안 한 채 동네 이야기 쓰기 칸을 누르면 로그인 창이 닫혀도 다시 열리던 문제 — 창이 포커스를 쓰기 칸으로 돌려놓아 반복됐음, 열기 전에 포커스를 뺌
This commit is contained in:
1 parent
668377660c
commit
65fd9b8fb1
1 file changed
+6
-1
@@ -130,7 +130,12 @@ function Composer({ onDone }: { onDone?: (t: TalkData) => void }) {
|
||||
id={COMPOSE_ID}
|
||||
value={text}
|
||||
onChange={(e) => setText(e.target.value)}
|
||||
onFocus={() => !loggedIn && open({ type: 'login' })}
|
||||
onFocus={(e) => {
|
||||
if (loggedIn) return
|
||||
// 로그인 창(<dialog>)은 닫힐 때 포커스를 이 칸으로 돌려놓아 다시 열리므로, 열기 전에 포커스를 뺀다
|
||||
e.currentTarget.blur()
|
||||
open({ type: 'login' })
|
||||
}}
|
||||
readOnly={busy}
|
||||
maxLength={BODY_MAX}
|
||||
rows={2}
|
||||
|
||||
Reference in new issue
Block a user