Voice input fails in browser address bars due to incorrect password field detection (v4.2.9, follow-up to #516)
メンテナーはふだん 1 日以内に返信
@LeanBitLab がすでに取り組んでいます。
2026年10月23日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 76/100
調査の方向性
VoiceInputManager.ktのisBlockedEditor()付近を読み、パスワードの判定を、クラスを考慮するInputTypeUtils.ktのユーティリティと比較してください。音声入力の既存テストがあれば確認し、アドレスバーのURLフィールドが拒否されなくなり、パスワードフィールドは引き続きブロックされることを検証してください。音声入力がブラウザーのアドレスバーで開始でき、パスワードフィールドでは引き続き拒否されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Voice dictation still fails in browser address bars after the fix for #516, included in LeanType v4.2.9.
Tested browsers: Firefox, Chrome, and Brave. The issue occurs in all three.
The microphone button appears in the address bar, but tapping it shows:
Voice input not available or permission missing
Voice dictation works correctly in ordinary text fields, including input fields within webpages.
Relationship to #516
Issue #516 was closed as completed via commit 3373e94.
That commit removed this condition from InputAttributes.kt:
- hasNoMicrophoneKeyOption() ||
This stops the app's NO_MICROPHONE flag from hiding the microphone button in browser address bars. However, it addresses button visibility, not the separate activation-time check. The button is now visible but voice recording still fails.
Root cause identified in source code
LeanType uses two inconsistent password-field checks.
1. Microphone visibility — class-aware
InputTypeUtils.isPasswordInputType() checks both the input class and variation:
val maskedInputType = inputType and
(InputType.TYPE_MASK_CLASS or InputType.TYPE_MASK_VARIATION)
Source: InputTypeUtils.kt, lines 56–65
2. Microphone activation — checks variation only
VoiceInputManager.isBlockedEditor() uses:
val variation = info.inputType and InputType.TYPE_MASK_VARIATION
return variation == InputType.TYPE_TEXT_VARIATION_PASSWORD ||
variation == InputType.TYPE_TEXT_VARIATION_WEB_PASSWORD ||
variation == InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD ||
variation == InputType.TYPE_NUMBER_VARIATION_PASSWORD
Source: VoiceInputManager.kt, lines 1071–1079
Android assigns the same numeric variation (0x10) to these two types:
TYPE_TEXT_VARIATION_URI— URL fields (text class)TYPE_NUMBER_VARIATION_PASSWORD— numeric password fields (number class)
Because isBlockedEditor() ignores TYPE_MASK_CLASS, a URL field can be incorrectly identified as a numeric password field. This explains the discrepancy between button visibility and activation.
Log evidence
The LeanType diagnostic log repeatedly shows the following immediately after tapping the microphone:
SuggestionStripView: click toolbar key VOICE
VoiceInputManager: canStartVoice: Blocked editor (password)
Other regular text fields successfully initiate recording and transcription. The logs establish that the password-field rejection is occurring; the source code indicates the cause of the misclassification.
To Reproduce
- Install LeanType v4.2.9 (standard flavor).
- Open Firefox, Chrome, or Brave.
- Focus the browser address bar.
- Tap LeanType's visible microphone button.
Actual behavior: Recording does not start. Instead, the keyboard reports Voice input not available or permission missing.
Expected behavior
Voice dictation should activate in browser address bars and insert recognized text as it does in regular text fields.
Suggested fix
Make VoiceInputManager.isBlockedEditor() check both input class and variation, ideally by reusing the existing class-aware utilities:
fun isBlockedEditor(info: EditorInfo?): Boolean {
if (info == null) return false
return InputTypeUtils.isPasswordInputType(info.inputType) ||
InputTypeUtils.isVisiblePasswordInputType(info.inputType)
}
This avoids duplicating password-detection logic and prevents collisions between URL fields and numeric password fields.
Screenshots
A screenshot showing the error message in the address bar is available. LeanType diagnostic logs are also available, showing repeated Blocked editor (password) warnings.
App version & Flavor
- Version: 4.2.9 (4209)
- Flavor: Standard
- Voice provider: Online
Device Info
- Model: Nothing Phone (2)
- OS version: Android 16 (SDK 36)
Related: #516 — Voice dictation does not work in browser URL bars. Its fix addressed microphone-button visibility, but the separate activation-time password-field detection remains defective. Please track this as a follow-up to #516.
- 主要言語
- Kotlin
- スター
- 1k
- フォーク
- 59
- 平均マージ
- 13時間 21分
- マージ済み PR(30日)
- 48
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
LeanBitLab/LeanType のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
LeanBitLab/LeanType#423 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
LeanBitLab/LeanType#723 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
LeanBitLab/LeanType#721 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
LeanBitLab/LeanType#720 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
LeanBitLab/LeanType#717 ·
メンテナーはふだん 1 日以内に返信
LeanBitLab/LeanType の issue をすべて見る
似ている issue
-
Messages: Subscribe to the new communication websocket topics対応中かも @krusche が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
ls1intum/artemis-android#801 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
keiyoushi/extensions-source#20362 ·
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
enhancement good first issue
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
software-mansion/enriched-markdown#1084 ·
メンテナーはふだん 2 日以内に返信