Skip to content

Feedback: No keyboard on Sentry default feedback form #5331

Closed

Description

@ereise205

Integration

sentry-android

Build System

Gradle

AGP Version

8.10.0

Proguard

Disabled

Other Error Monitoring Solution

Firebase Crashlytics

Version

8.40.0

Steps to Reproduce

  1. Add the default SentryUserFeedbackButton in XML or programatically.
  2. Run Android App on physical device.
  3. Click on the Feedback button
  4. See the feedback form and click in one of the text boxes

Expected Result

Keyboard should pop up so user can input text

Actual Result

Keyboard does not pop up.

Activity

  1. linear-code commented on Apr 23, 2026

    @linear-code
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Apr 23, 2026
  3. ereise205 commented on Apr 23, 2026

    @ereise205
    Author

    Relevant conversation with claude code about this:

    So Sentry never set the FLAG_ALT_FOCUSABLE_IM flag? It was set by AlertDialog (which Sentry feedback extends) and then never changed by sentry?

    ⏺ Yes, exactly.

    The sequence we traced:

    1. SentryUserFeedbackDialog extends AlertDialog.

    2. When show() is called, Dialog.dispatchOnCreate() fires, which calls SentryUserFeedbackDialog.onCreate(). The first line of that is super.onCreate(savedInstanceState) → runs AlertDialog.onCreate().

    3. AlertDialog.onCreate() invokes AlertController.installContent(), which installs AlertDialog's default layout (title + message + OK/Cancel buttons — no EditTexts). As part of that pipeline, the framework's auto-detection runs, sees "no text editors in the content," and sets FLAG_ALT_FOCUSABLE_IM on the window.

    4. Control returns to SentryUserFeedbackDialog.onCreate(), which then calls setContentView(R.layout.sentry_dialog_user_feedback) — swapping in Sentry's layout, which does contain three EditTexts. But setContentView just replaces the view hierarchy; it does not re-run the IME-flag detection.

    5. Sentry's code touches nothing else on the window — no addFlags, no clearFlags, no setSoftInputMode. We grep-confirmed this earlier by searching the Sentry source for any flag manipulation and finding none.

    So the flag is inherited "stuck on" from step 3 and survives through step 4. The dialog ships to the window manager with FLAG_ALT_FOCUSABLE_IM set and behaves as if its content needs no IME.

    Our fix clears the flag explicitly — both before show() and again in OnShowListener (belt-and-suspenders, since the flag's exact lifecycle inside AlertDialog isn't formally documented) — and then we call showSoftInput ourselves on the focused EditText so the IME comes up regardless of any lingering state.

    Whether this is technically a bug in Sentry or in AlertDialog is debatable: AlertDialog's auto-detection assumes setContentView happens before onCreate, which isn't the Sentry flow. Either side could fix it — Sentry by clearing the flag after their setContentView, or AlertDialog by re-detecting on content changes. Neither does, so we patch it from the app.

  4. added a commit that references this issue on May 5, 2026
    e3e78e1
  5. github-actions commented on May 6, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #5359, which was included in the 8.41.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions