Skip to content

Fix: Force keyboard dismissal on non-touch devices (#13337)#13373

Open
KartikeyTripathi469 wants to merge 1 commit intoTeamNewPipe:devfrom
KartikeyTripathi469:fix/keyboard-regression-13337
Open

Fix: Force keyboard dismissal on non-touch devices (#13337)#13373
KartikeyTripathi469 wants to merge 1 commit intoTeamNewPipe:devfrom
KartikeyTripathi469:fix/keyboard-regression-13337

Conversation

@KartikeyTripathi469
Copy link
Copy Markdown

@KartikeyTripathi469 KartikeyTripathi469 commented Mar 24, 2026

What is it?

  • Bugfix (user-facing)
  • Feature (user facing) ⚠️ Your PR must target the refactor branch
  • Codebase improvement (dev-facing)
  • Meta improvement to the project (dev-facing)

Description of the changes in your PR

  • Restored functional keyboard dismissal for non-touch devices (Fire TV Stick, D-Pad, Android TV).
  • Introduced a documented constant CLEAR_SOFT_INPUT_FORCED (value 0) in KeyboardUtil.java to replace HIDE_NOT_ALWAYS.
  • On non-touch systems, the IME flags the initial focus as an explicit user action, making HIDE_NOT_ALWAYS ineffective; using flag 0 ensures a forced dismissal while remaining lint-compliant.

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts", and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Mar 24, 2026
@TobiGr
Copy link
Copy Markdown
Contributor

TobiGr commented Mar 24, 2026

@theimpulson Could you take a look at this? The regression was introduced in 2182ff1 / #13194

@TobiGr TobiGr requested a review from theimpulson March 24, 2026 11:33
@TobiGr TobiGr added bug Issue is related to a bug GUI Issue is related to the graphical user interface device/software specific Issues that only happen on some devices or with some specific hardware/software labels Mar 24, 2026
@absurdlylongusername
Copy link
Copy Markdown
Member

@KartikeyTripathi469 Please do not remove default PR template.
Please restore it and fill it out properly.

@absurdlylongusername absurdlylongusername added the template missing The bug/feature template is missing (e.g. the used app does not support issue templates) label Mar 24, 2026
@KartikeyTripathi469
Copy link
Copy Markdown
Author

I've reviewed commit 2182ff1 and confirmed it replaced RESULT_UNCHANGED_SHOWN with HIDE_NOT_ALWAYS to address the lint requirement in FeedGroupDialog.kt.

However, HIDE_NOT_ALWAYS is ineffective on non-touch devices (Fire TV/D-Pad) because the system flags the initial focus as an explicit user action, causing the keyboard to persist. My proposed fix uses flag 0, which provides the necessary forced dismissal for all input types while remaining fully lint-compliant.

@theimpulson
Copy link
Copy Markdown
Member

However, HIDE_NOT_ALWAYS is ineffective on non-touch devices (Fire TV/D-Pad) because the system flags the initial focus as an explicit user action, causing the keyboard to persist. My proposed fix uses flag 0, which provides the necessary forced dismissal for all input types while remaining fully lint-compliant.

Thanks, makes sense to me. However, please introduce a new constant and add a doc-comment explaining that, then use it.

@KartikeyTripathi469 KartikeyTripathi469 force-pushed the fix/keyboard-regression-13337 branch from 6042c00 to 0569607 Compare March 24, 2026 14:05
@TobiGr
Copy link
Copy Markdown
Contributor

TobiGr commented Mar 24, 2026

something is wrong with your commit. The commit message is strange. Please have a look.

@KartikeyTripathi469 KartikeyTripathi469 force-pushed the fix/keyboard-regression-13337 branch from 0569607 to 3a7d68f Compare March 24, 2026 14:51
@KartikeyTripathi469
Copy link
Copy Markdown
Author

Hi Mentors,

Apologies for the confusion. My local environment had an incorrect commit message during the previous amend due to a sync issue with the dev branch.

I have now corrected the commit history to properly reflect the changes:

Commit Message: Updated to 'Fix: Force keyboard dismissal on non-touch devices (D-Pad/Fire TV)'.

Code: The requested CLEAR_SOFT_INPUT_FORCED constant and documentation are still included.

The PR should now be clean and ready for review. Thank you for catching that!

@theimpulson
Copy link
Copy Markdown
Member

Hi @KartikeyTripathi469, can you also fill the PR template?

@KartikeyTripathi469

This comment was marked as resolved.

@KartikeyTripathi469 KartikeyTripathi469 force-pushed the fix/keyboard-regression-13337 branch from 3a7d68f to 0edf85c Compare March 24, 2026 19:32
@KartikeyTripathi469
Copy link
Copy Markdown
Author

I hope you're doing well. I just wanted to follow up on the PR I submitted earlier. Whenever you get some time, could you please review it?

If everything looks good, could you please merge it as well?

Let me know if any changes are needed from my side, and I would be happy to update it.

Thanks!

Copy link
Copy Markdown
Member

@theimpulson theimpulson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you have force pushed and overwritten your changes. Could you please restore the previous change?

@KartikeyTripathi469 KartikeyTripathi469 force-pushed the fix/keyboard-regression-13337 branch from 0edf85c to 8107e02 Compare March 27, 2026 16:41
@KartikeyTripathi469
Copy link
Copy Markdown
Author

My bad. I accidentally force pushed down that, which overwrote the changes while syncing my local environment. I have now restored the CLEAR_SOFT_INPUT_FORCED Constant and updated the hidekeyboard method. Thanks for the feedback. If everything looks good, could you please merge it as well?

@KartikeyTripathi469 KartikeyTripathi469 force-pushed the fix/keyboard-regression-13337 branch from 8107e02 to 54f9fd4 Compare March 27, 2026 19:40
@KartikeyTripathi469 KartikeyTripathi469 force-pushed the fix/keyboard-regression-13337 branch from 54f9fd4 to 36aedfa Compare March 27, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software GUI Issue is related to the graphical user interface size/small PRs with less than 50 changed lines template missing The bug/feature template is missing (e.g. the used app does not support issue templates)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search function broken on devices without touchscreen (regression in v0.28.4)

4 participants