Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix site creation illegal state #21670

Merged
merged 5 commits into from
Feb 7, 2025

Conversation

nbradbury
Copy link
Contributor

Potentially fixes #21669

This was initially addressed in #21566 but we continue to see the crash even in 25.6, albeit less frequently.

I was not able to reproduce the crash in trunk but looking at the site creation code I noticed we were forcing the keyboard to appear with every single key press while searching. This could easily cause problems, especially if the runnable we used to delay the showing of the keyboard executed when the screen was no longer active.

To resolve this I chose to simply remove the force showing of the keyboard, instead letting the system handle it when the user taps the search field. I did note the following comment above the old code that forced the keyboard to show:

/**
 * This workaround handles the case where the SiteCreationDomainsFragment appears after the
 * DesignPreviewFragment dismisses and the keyboard fails to appear
 */

This is still an issue, but the keyboard will appear when the user taps the search field, and I think that's better than constantly forcing the keyboard to unnecessarily appear.

@dangermattic
Copy link
Collaborator

dangermattic commented Feb 7, 2025

1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

Copy link

sonarqubecloud bot commented Feb 7, 2025

@wpmobilebot
Copy link
Contributor

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr21670-39d4316
Commit39d4316
Direct Downloadjetpack-prototype-build-pr21670-39d4316.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr21670-39d4316
Commit39d4316
Direct Downloadwordpress-prototype-build-pr21670-39d4316.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.38%. Comparing base (32501d0) to head (39d4316).
Report is 1 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #21670      +/-   ##
==========================================
- Coverage   39.42%   38.38%   -1.04%     
==========================================
  Files        2122      601    -1521     
  Lines       99558    28992   -70566     
  Branches    15317     3732   -11585     
==========================================
- Hits        39247    11128   -28119     
+ Misses      56832    16847   -39985     
+ Partials     3479     1017    -2462     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nbradbury nbradbury requested a review from dcalhoun February 7, 2025 15:19
@nbradbury nbradbury marked this pull request as ready for review February 7, 2025 15:19
Copy link
Member

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

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

Changes tested well for me.

To resolve this I chose to simply remove the force showing of the keyboard, instead letting the system handle it when the user taps the search field. I did note the following comment above the old code that forced the keyboard to show:

This seems like a reasonable trade-off to me.

For posterity, it appears this workaround was added in #13424 (comment); the original keyboard display was added in #12085.

@nbradbury nbradbury merged commit 1f82323 into trunk Feb 7, 2025
25 checks passed
@nbradbury nbradbury deleted the issue/21669-site-creation-illegal-state branch February 7, 2025 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IllegalStateException: focus search returned a view that wasn't able to take focus!
4 participants