Bug 22211 - Xamarin.iOS doesn't call DeleteBackward method from UIKeyInput Protocol
Summary: Xamarin.iOS doesn't call DeleteBackward method from UIKeyInput Protocol
Status: RESOLVED UPSTREAM
Alias: None
Product: iOS
Classification: Xamarin
Component: Pre-release ()
Version: 7.9.2.x
Hardware: Other Mac OS
: Normal normal
Target Milestone: 8.0.0 (iOS 8)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-08-19 14:03 UTC by Sergey
Modified: 2014-08-24 12:45 UTC (History)
3 users (show)

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


Attachments
Sample app (11.21 KB, application/x-zip-compressed)
2014-08-19 14:03 UTC, Sergey
Details


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:
Status:
RESOLVED UPSTREAM

Description Sergey 2014-08-19 14:03:01 UTC
Created attachment 7725 [details]
Sample app

Xamarin doesn't call DeleteBackward method from UIKeyInput Protocol

I've created custom UITextField(see below), added UITextField thru designer, selected class as BackspaceTextField

 [Register("BackspaceTextField")] 
 public sealed class BackspaceTextField : UITextField
 {
        public BackspaceTextField(IntPtr handle) : base(handle)
        {
        }

        public override void DeleteBackward ()
        {
            Console.WriteLine ("DeleteBackward");
        }

        public override void InsertText (string text)
        {
            Console.WriteLine ("InsertText ");
            base.InsertText(text);
        }
 }

Steps to reproduce:

1) Enter any text, "InsertText" is appeared
2) Press Backspace nothing is appeared

Please note the same works perfectly in iOS 7.1

Discussion in Xamarin's forum http://forums.xamarin.com/discussion/comment/71244
Comment 1 narayanp 2014-08-20 09:37:54 UTC
I have tried to reproduce this issue and we are also getting the same issue. I run the attached sample and insert any text in Text box then message "InsertText" is getting appear in Application Output pad but when I tap the backspace the nothing is getting appear in Application output pad and DeleteBackward method does not call.

Screencast: http://www.screencast.com/t/zhU21zoRTEZr

Environment info:
=== Xamarin Studio ===

Version 5.3 (build 429)
Installation UUID: ff0c16c6-3c75-46d8-ac56-56c3b56e2c76
Runtime:
	Mono 3.8.0 ((no/62a857e)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000007

=== Apple Developer Tools ===

Xcode 6.0 (6256.8)
Build 6A279r

=== Xamarin.Mac ===

Version: 1.10.0.9 (Trial Edition)

=== Xamarin.iOS ===

Version: 7.9.2.136 (Trial Edition)
Hash: fef687c
Branch: 
Build date: 2014-07-30 16:28:53-0400

=== Xamarin.Android ===

Version: 4.16.0 (Trial Edition)
Android SDK: /Users/360_macmini/Desktop/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Build Information ===

Release ID: 503000429
Git revision: ad1470467446b532ed54124a36bf1381a7471020
Build date: 2014-08-19 12:31:31-04
Xamarin addins: 3d041b1639f938107c5e1c71c54d9a346b30c660

=== Operating System ===

Mac OS X 10.9.4
Darwin Apples-iMac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 2 Sebastien Pouliot 2014-08-24 12:45:33 UTC
This is an Apple iOS8 bug. It's been reported a few times on Apple's developer forums [1].

[1] https://devforums.apple.com/message/1009150#1009150

note: in general (99%) our bindings are not specific for an iOS version. OTOH it perfectly correct to report them to us - just in case :-)