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(searchbar): set inputmode default to undefined #20080

Merged
merged 7 commits into from Dec 16, 2019

Conversation

liamdebeasi
Copy link
Member

@liamdebeasi liamdebeasi commented Dec 13, 2019

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Issue Number: #20074
inputmode="search" was the default for ion-searchbar. However, that causes Android devices to show a submit button with a carriage return icon instead of a magnifying glass. Some users expressed interest in keeping the magnifying glass. Unfortunately, there was no "non-hacky" way of opting out of inputmode="search" besides doing something like inputmode="".

What is the new behavior?

This updates the default value to be undefined. Those who prefer the carriage return icon can set inputmode="search".

Does this introduce a breaking change?

  • Yes
  • No
old new
search search2
IMG_6491 IMG_6490

In order to make the iOS button be a blue button that says search, users must wrap the input in a form with an action:

IMG_6492

@ionitron-bot ionitron-bot bot added the package: core @ionic/core package label Dec 13, 2019
@liamdebeasi liamdebeasi marked this pull request as ready for review December 13, 2019 15:06
core/src/components/searchbar/usage/angular.md Outdated Show resolved Hide resolved
core/src/components/searchbar/usage/angular.md Outdated Show resolved Hide resolved
core/src/components/searchbar/usage/angular.md Outdated Show resolved Hide resolved
core/src/components/searchbar/usage/javascript.md Outdated Show resolved Hide resolved
core/src/components/searchbar/usage/react.md Outdated Show resolved Hide resolved
core/src/components/searchbar/usage/vue.md Outdated Show resolved Hide resolved
core/src/components/searchbar/readme.md Outdated Show resolved Hide resolved
core/src/components/searchbar/readme.md Outdated Show resolved Hide resolved
liamdebeasi and others added 2 commits December 16, 2019 11:28
Co-Authored-By: Brandy Carney <brandyscarney@users.noreply.github.com>
Co-Authored-By: Brandy Carney <brandyscarney@users.noreply.github.com>
@liamdebeasi liamdebeasi merged commit 6612604 into master Dec 16, 2019
@liamdebeasi liamdebeasi deleted the searchbar-default branch December 16, 2019 17:16
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.

None yet

2 participants