xamarin/Xamarin.Forms

UWP Entry.ReturnType overrides anything set by Entry.Keyboard

Open

#3,820 opened on Sep 18, 2018

 (4 comments) (0 reactions) (0 assignees)C# (1,926 forks)batch import
3.2.0e/2 :clock2:good first issuehackathonhelp wantedi/regressioninactivep/UWPt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description

I wondered why my Keyboard.Numeric wasn't working on an Entry control. It seems when the ReturnType support was added to UWP that it wasn't done right. Because UpdateReturnType in the renderer will overwrite the InputScope which was just set by UpdateInputScope.

A possible way to fix this is to combine the UpdateReturnType and UpdateInputScope methods into one, since they both share the same underlying InputScope property on the Control.

See lines #231 and #301 in https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.UAP/EntryRenderer.cs

Steps to Reproduce

  1. Make an Entry control use Keyboard.Numeric (for example)
  2. Observe that Entry control erroneously offers full textual input if you bring up the onscreen keyboard in Win10.

Expected Behavior

The Entry control to respect the chosen Keyboard mode.

Actual Behavior

The Entry control doesn't respect the Keyboard mode but does respect the ReturnType mode.

Basic Information

  • Version with issue: 3.2 pre3
  • Last known good version: not known
  • IDE:
  • Platform Target Frameworks:
    • iOS:
    • Android:
    • UWP: 1709
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Contributor guide