bug: picker-column setFocus() does not focus the column

未關閉
#30,634 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

  • #30677 來自 @vunizhona —— 已關閉,未合併

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
typescript

研究方向

首先閱讀 issue 中引用的 ion-picker 和 ion-datetime 數字輸入模式實作,包括內部輸入狀態以及實際點擊觸發的事件。完成的標準是存在一個有文件說明的公開進入和退出 API,具備所需的作用域和焦點選項,並且以程式方式使用時能重現現有數字模式的行為。

由索引模型根據 Issue 內容生成。

描述

triage
Prerequisites
Describe the Feature Request

ion-datetime (wheel) + ion-picker supports a “numeric input mode” when the user taps a numeric column: the picker focuses an internal , shows the OS keypad, and lets users type to update both hour and minute columns.

There’s currently no public API to trigger the same behavior programmatically (e.g., from a button or accessibility shortcut).

Describe the Use Case
  • Accessibility: provide a keyboard/assistive-tech control to enter numeric mode.

  • UX: offer an “Edit time” button that behaves exactly like a tap.

  • Automated testing & consistency across platforms.

Describe Preferred Solution

Expose a safe, documented method:

// on ion-picker (and used by ion-datetime internally)
enterInputMode(column?: HTMLIonPickerColumnElement | 'hour' | 'minute', options?: { focus?: boolean }): void;
exitInputMode(): void;

// or on ion-datetime (delegates to internal picker)
enterInputMode(scope?: 'all' | 'hour' | 'minute', options?: { focus?: boolean }): void;

Behavior should mirror a real tap:

  • Set internal input-mode state (multi-column when scope === 'all').

  • Emit the same event columns currently listen for.

  • focus the hidden input to open the keypad.

Describe Alternatives

No response

Related Code

Any datetime/picker

Additional Information

Without a public API, it’s impossible to trigger numeric input mode via assistive technology (e.g., VoiceOver/ TalkBack actions, hardware keyboard shortcuts, or custom accessibility buttons). This can prevent certain users from easily adjusting time values, especially those with motor impairments who find wheel scrolling difficult.

主要語言
TypeScript
星號
52.8k
分支
13.3k
平均合併
3 天 1 小時
30 天內合併 PR
86

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

ionic-team/ionic-framework 的其他 Issue

查看 ionic-team/ionic-framework 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。