|
198 | 198 | } |
199 | 199 |
|
200 | 200 | #candidate-display { |
| 201 | + /* 修正 1: 調整最小高度 */ |
201 | 202 | display: flex; |
202 | 203 | align-items: center; |
203 | 204 | padding: 8px; |
204 | 205 | gap: 12px; |
205 | 206 | white-space: nowrap; |
206 | 207 | overflow-x: scroll; |
207 | 208 | -webkit-overflow-scrolling: touch; |
208 | | - min-height: 48px; |
| 209 | + min-height: 60px; /* 從 48px 調整為 60px */ |
209 | 210 | background-color: #fff; |
210 | 211 | box-shadow: 0 1px 0 var(--border-color); |
211 | 212 | } |
|
215 | 216 | } |
216 | 217 |
|
217 | 218 | #candidate-display span { |
| 219 | + /* 修正 2: 調整字型大小 */ |
218 | 220 | cursor: pointer; |
219 | 221 | padding: 5px 8px; |
220 | 222 | border-radius: 4px; |
221 | 223 | transition: all 0.2s; |
222 | 224 | user-select: none; |
223 | 225 | white-space: nowrap; |
224 | | - font-size: 1.2rem; |
| 226 | + font-size: 1.4rem; /* 從 1.2rem 調整為 1.4rem */ |
225 | 227 | flex-shrink: 0; |
226 | 228 | text-align: center; |
227 | 229 | } |
|
383 | 385 | // --- 長按相關狀態 --- |
384 | 386 | let longPressTimer = null; |
385 | 387 | let longPressCommitted = false; |
386 | | - // *** 修正點 2:延長長按時限,更容易觸發 *** |
387 | | - const LONG_PRESS_TIMEOUT = 750; // 500ms -> 750ms |
| 388 | + const LONG_PRESS_TIMEOUT = 750; |
388 | 389 |
|
389 | 390 | // --- 游標 HTML 定義 --- |
390 | 391 | const CURSOR_HTML = '<span id="main-cursor" class="cursor">\u200c</span>'; |
|
880 | 881 | if (keyElement.handlePressDown) { |
881 | 882 | keyElement.removeEventListener('touchstart', keyElement.handlePressDown); |
882 | 883 | keyElement.removeEventListener('touchend', keyElement.handlePressUp); |
883 | | - keyElement.removeEventListener('touchmove', keyElement.handlePressCancel); // 移除舊的 touchmove 綁定 |
884 | 884 | keyElement.removeEventListener('touchcancel', keyElement.handlePressCancel); |
885 | 885 | keyElement.removeEventListener('mousedown', keyElement.handlePressDown); |
886 | 886 | keyElement.removeEventListener('mouseup', keyElement.handlePressUp); |
|
959 | 959 | keyElement.addEventListener('touchstart', handlePressDown); |
960 | 960 | keyElement.addEventListener('touchend', handlePressUp); |
961 | 961 | keyElement.addEventListener('touchcancel', handlePressCancel); // 處理觸摸中斷 |
962 | | - // *** 核心修正:移除此行,讓輕微的 touchmove 不會取消長按計時器 *** |
963 | | - // keyElement.addEventListener('touchmove', handlePressCancel); // <--- 原有的問題代碼 |
| 962 | + // *** 核心修正:移除 touchmove 綁定 *** |
964 | 963 |
|
965 | 964 | // Mouse Events (用於桌面測試) |
966 | 965 | keyElement.addEventListener('mousedown', handlePressDown); |
|
0 commit comments