Skip to content

TextInputType should support webSearch which maps to iOS UIKeyboardType.webSearch #157562

@stonemaster

Description

@stonemaster

Use case

iOS supports since iOS 7.0 the keyboard type webSearch which is a system keyboard that can be used in text fields that both search, but also cope with URLs. From the official documentation:

UIKeyboardTypeWebSearch API_AVAILABLE(ios(7.0)), // A default keyboard type with URL-oriented addition (shows space . prominently).

image

On Android this type could be mapped to url as it does pretty much the same, and has both space and . keys.

On iOS the url keyboard is useless for the search use case as it won't show a space bar.

I tried to workaround with custom iOS code but this is very tedious and I didn't find a solution.

Also there is a third-party package keyboard_actions which allows to add a top-bar "." button, but this unfortauntely isn't the same user experience. Browsers like Safari, Chrome and Duck Duck Go use the iOS native UIKeyboardTypeWebSearch in the search bars as well.

Proposal

  1. TextInputType should get a new enumeration webSearch
  2. On Android (or any other platform) this remapped to url
  3. The platform dependent code in flutter/engine for iOS is adapted to map webSearch to UIKeyboardTypeWebSearch

If there is a chance this is accepted by the Flutter team, I am gladly willing to do the implementation and create PRs for flutter and the engine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsengineflutter/engine related. See also e: labels.frameworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-text-inputOwned by Text Input teamtriaged-text-inputTriaged by Text Input team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions