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

refactor(input-shims): disable input blurring util by default #29104

Merged
merged 6 commits into from
Mar 1, 2024

Conversation

liamdebeasi
Copy link
Contributor

@liamdebeasi liamdebeasi commented Feb 29, 2024

Issue number: resolves #29072


What is the current behavior?

The input blurring utility is causing adverse side effects in developer applications by causing certain UI components to be blurred. This utility was added back in 2017.

That commit claims to fix a number of issues, but #8933 and #11484 seem most relevant here.

While the purpose of this utility is not definitively known it appears that this was created to solve an issue on iOS where the searchbar was not being blurred when tapping outside of the input. The linked issues refer to cases where inputs are not blurred when they should be. This aligns with the input blurring utility behavior where it only blurs elements and never focuses them.

Additionally, the two linked issues only happened on iOS which aligns with the default behavior of the input blurring utility which is to only be enabled on iOS.

I tested the searchbar on iOS with this utility disabled and I was able to blur the searchbar by tapping outside the input. It seems that this utility was created to work around a WebKit issue that has since been resolved.

RPReplay_Final1709245374.MP4

What is the new behavior?

  • Given that I am not 100% sure that this utility does what I think it does, I'd like to propose we disable this feature by default starting in Ionic 8. This will resolve the linked issue but also give developers an escape hatch (by manually re-enabling it in their apps) if disabling the utility does cause issues. The team can evaluate remove the code altogether if disabling it does not have any known adverse side effects.

Does this introduce a breaking change?

  • Yes
  • No

I don't consider this a breaking change because a) inputBlurring is a private API and b) there current thinking is that there should be no behavior change (other than the buggy behaviors going away) since this utility exists to solve a WebKit issue that no longer exists.

Other information

Dev build: 8.0.0-dev.11709245047.1565a499

@github-actions github-actions bot added the package: core @ionic/core package label Feb 29, 2024
@liamdebeasi liamdebeasi marked this pull request as ready for review February 29, 2024 22:29
@liamdebeasi liamdebeasi changed the title fix(input-shims): disable input blurring util by default refactor(input-shims): disable input blurring util by default Feb 29, 2024
@liamdebeasi liamdebeasi requested review from a team and averyjohnston and removed request for a team February 29, 2024 22:31
core/src/utils/input-shims/input-shims.ts Outdated Show resolved Hide resolved
core/src/utils/input-shims/input-shims.ts Outdated Show resolved Hide resolved
@liamdebeasi liamdebeasi merged commit bf1701e into feature-8.0 Mar 1, 2024
44 checks passed
@liamdebeasi liamdebeasi deleted the FW-6011 branch March 1, 2024 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants