Xamarin.forms: [macOS] Completed event of Entry raised on Tab key

Created on 24 Jan 2018  路  2Comments  路  Source: xamarin/Xamarin.Forms

Description

Completed event of Entry is raised on Tab key when Text is not empty.

Steps to Reproduce

  1. Add Entry on ContentPage
  2. Subscribe to Completed event
  3. Launch app
  4. Enter text and press Tab key

Expected Behavior

Completed event only raised when Enter key pressed.

Actual Behavior

Completed event raised when lost focus i think.

Basic Information

  • Version with issue: Xamarin.Forms 2.5.0.122203
  • IDE: Visual Studio for Mac 7.3.3 (build 5)
  • Platform Target Frameworks:

    • macOS: 10.13.2

1 macOS bug

All 2 comments

This is probably because the NSTextField is set up to send its action on "end editing"; what you are asking is for it to be sent on "enter only". Unfortunately, while this can be easily accomplished using the Xcode nib editor, I cannot immediately see a way to do it from C#.

I am going to look at fixing the Completed event invocation to be the desired Enter/Return key only on macOS.

Was this page helpful?
0 / 5 - 0 ratings