xamarin/Xamarin.Forms

UWP Entry.ReturnType overrides anything set by Entry.Keyboard

Aperta

#3820 aperta il 18 set 2018

 (4 commenti) (0 reazioni) (0 assegnatari)C# (1926 fork)batch import
3.2.0e/2 :clock2:good first issuehackathonhelp wantedi/regressioninactivep/UWPt/bug :bug:up-for-grabs

Metriche repository

Star
 (5644 stelle)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

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:

Guida contributor