From 1495c2baef33661589e8e74f840d62f9e763aefa Mon Sep 17 00:00:00 2001 From: Aaron Nelson Date: Sun, 26 Apr 2026 12:56:06 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20login=20button=20=E2=80=94=20use=20onPoin?= =?UTF-8?q?terUp=20for=20cross-platform=20touch=20support?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/login/page.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/login/page.tsx b/app/login/page.tsx index 7c77b23..e70ada3 100644 --- a/app/login/page.tsx +++ b/app/login/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useState, useRef } from 'react'; +import { useRef, useState } from 'react'; export default function LoginPage() { const [error, setError] = useState(''); @@ -19,7 +19,7 @@ export default function LoginPage() { credentials: 'include', body: JSON.stringify({ password }), }); - if (!res.ok) throw new Error('Invalid password'); + if (!res.ok) throw new Error('bad'); window.location.href = '/'; } catch { setError('Invalid password'); @@ -58,9 +58,8 @@ export default function LoginPage() { ref={inputRef} type="password" placeholder="Password" - autoFocus autoComplete="current-password" - onKeyDown={e => e.key === 'Enter' && handleLogin()} + onKeyDown={e => { if (e.key === 'Enter') handleLogin(); }} style={{ width: '100%', background: '#faf9f6', @@ -73,6 +72,7 @@ export default function LoginPage() { marginBottom: error ? '6px' : '16px', display: 'block', boxSizing: 'border-box', + WebkitAppearance: 'none', }} /> @@ -83,7 +83,7 @@ export default function LoginPage() { )}