Question

I have a Monotouch.Dialog EntryElement.

Occasionally when I start typing, nothing shows up...

The cursor does not display, and if I type text, it cannot be seen, but it does get persisted to the EntryElement.Value property.

The problem seems to be only on the iPhone itself, but not on the iOS Simulator. I'm running iOS 6.3

Any ideas? This pretty much writes off Monotouch for me if I can't have a consistent user experience.

Was it helpful?

Solution

At Xamarin bug tracking system Bug 7398 is the situation you described.

But it is version 5.4 of iOS and on 5.2 it works fine.

Also Bug 7116 describes the same issue but this time it wasnt Xamarins bug.

My suggestion to you is to post you issue as a bug at bugzilla.xamarin.com.

Plese you the sample I have provided above to write you bug report correctly.

OTHER TIPS

Just a work around that do the job for me:

//FIXME: this is a workaround  about a bug relative to the position of TextBox element
// https://bugzilla.xamarin.com/show_bug.cgi?id=7398
var tmp = new EntryElement ("a", "a", "a");

I've added this code to the very first View on my application and the problem is gone.

I hope that helps to others.

It sounds like you are running across a bug. The only solution that has actually worked for me is to subclass EntryElement, and call the FetchValue(); method in the constructor. Here is an example:

public SAEntryElement (string caption, string placeholder, string value) : base(caption, placeholder, value)
    { 
        // HACK: A workaround in an attempt to stop the bug where the value field would be empty sometimes
        FetchValue();
    }

I have not been able to make a reliable test case to put on Xamarin's bugzilla, and I didnt have time to fight it any longer. Since I have implemented this workaround, the problem is gone on both the simulator and device for a few months now. Also note there is a similar symptom for a known bug related to empty strings as Captions (seperate problem).

With the help of MikroDel's answer and the comments in bugzilla for the bug 7398, the problem for me was that the Height of the EntryElement was 0.

Setting it to the desired value (bigger than 0) fixed the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top