Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Voice input fails in browser address bars due to incorrect password field detection (v4.2.9, follow-up to #516)

Open Beginner friendly
#713 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
android, kotlin
Domain
backend, mobile

Research direction

Read VoiceInputManager.kt around isBlockedEditor() and compare its password checks with the class-aware utilities in InputTypeUtils.kt. Check the existing voice input tests, if present, and verify address bar URL fields are no longer rejected while password fields remain blocked. Done means voice input starts in browser address bars and still refuses password fields.

Written by the indexing model from the issue text.

Description

bug

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

  1. Install LeanType v4.2.9 (standard flavor).
  2. Open Firefox, Chrome, or Brave.
  3. Focus the browser address bar.
  4. 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.

Dominant language
Kotlin
Stars
1k
Forks
59
Avg merge
13h 11m
Merged PRs (30d)
47

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from LeanBitLab/LeanType

All issues in LeanBitLab/LeanType

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.