Voice input fails in browser address bars due to incorrect password field detection (v4.2.9, follow-up to #516)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
Hướng nghiên cứu
Đọc VoiceInputManager.kt ở phần quanh isBlockedEditor() và so sánh các bước kiểm tra mật khẩu với các tiện ích có xét đến lớp trong InputTypeUtils.kt. Kiểm tra các bài kiểm tra nhập liệu bằng giọng nói hiện có, nếu có, và xác minh rằng các trường URL trên thanh địa chỉ không còn bị từ chối, trong khi các trường mật khẩu vẫn bị chặn. Hoàn thành khi tính năng nhập liệu bằng giọng nói khởi chạy trong thanh địa chỉ của trình duyệt và vẫn từ chối các trường mật khẩu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Kotlin
- Star
- 1k
- Fork
- 59
- Merge trung bình
- 13 giờ 11 phút
- Pull request đã merge (30 ngày)
- 47
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của LeanBitLab/LeanType
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
LeanBitLab/LeanType#423 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Crush ReportĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 20/100
LeanBitLab/LeanType#715 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Text Expander/cursor-handling bugCó thể đã có người làm @LeanBitLab đã nhận 2 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
LeanBitLab/LeanType#703 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
LeanBitLab/LeanType#699 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
support minicpmĐang mởenhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
LeanBitLab/LeanType#698 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của LeanBitLab/LeanType
Issue tương tự
-
afk-ok area:data-quality importer size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
enorm-labs/event-junkie#3767 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Resource]: CrewforthĐang mởresource-submission validation-passed
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
hesreallyhim/awesome-claude-code#3201 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
software-mansion/starknet-jvm#641 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
leboncoin/spark-android#2342 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
The Voraton URL has been changedCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởBug Domain changed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
keiyoushi/extensions-source#20257 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày