Bug 34355 - Pressing enter in EditView dispatches EditorAction event twice
Summary: Pressing enter in EditView dispatches EditorAction event twice
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2015-09-28 14:56 UTC by domen
Modified: 2015-09-29 14:56 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Test project that exhibits described behaviour (4.97 KB, application/x-zip-compressed)
2015-09-28 14:56 UTC, domen

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description domen 2015-09-28 14:56:05 UTC
Created attachment 13103 [details]
Test project that exhibits described behaviour

Pressing enter key when EditView field has focus dispatches its EditorAction event twice. I don't know if this is by design but it looks like event is dispatched on key down and key up. And that can lead to unexpected behaviour of the application when testing.

I've attached a test project. Steps to reproduce:
* Run project in Xamarin Android Player.
* Click on the edit field in the activity and press enter key.
* Console.WriteLine is called twice. I expect it to be called only once.

My Xamarin version:

Xamarin Studio
Version 5.9.6 (build 23)
Installation UUID: 59a6b98a-f16f-4f0a-9aa9-e5192209be89
	Microsoft .NET 4.0.30319.34209
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

Version: 5.1.6
Android SDK: [...]
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: [...]
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) Client VM (build 25.60-b23, mixed mode)

Xamarin Android Player
Version: 0.6.1
Location: [...]

Build Information
Release ID: 509060023
Git revision: ffb99e7bbfddb36e10b6162f94eeb3166332d5a5
Build date: 2015-08-27 09:59:33-04
Xamarin addins: e92e5fe27863d5c4748872fa55e0fdbe09d27856
Comment 1 Mark Simpson 2015-09-29 12:22:22 UTC
I can see the same behaviour when using Google's Android emulator. This does not look to be an issue with Xamarin Android Player and so I'm going to move this bug.