santoshko / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

textfield contents sometimes not drawn on iOS #1074

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Please clearly state whether the issue relates to a device/the simulator or
the tools.
If related to a device be sure to specify exactly which device with as much
details as possible.

What steps will reproduce the problem?
1. Create a simple form with textfields and a checkbox (screenshot attached)
2. in iOS app tap on a textfield to open the virtual keyboard, enter some text 
and tap on the checkbox

What is the expected output? What do you see instead?

The entered text should be shown in the textfield, but the textfield is empty 
and you can see field contents only after the field is repainted. Please note 
that the problem occurs only if the keyboard is dismissed by tapping on the 
CheckBox, clicking elsewhere is not causing the problem.

What version of the product are you using? On what operating system?

the latest build server build, iOS 7.0.6, tested on iPhone 4S and 5S. In some 
reason it is not reproducable on iOS simulator.

Please provide any additional information below.

The problem seams to come from this that textfield is not repainted so often as 
it used to be in older CN1 versions. I could fix the problem by adding 
repaint(); call to the beginning of com.codename1.uiTextField method 
fireDataChanged:

public void fireDataChanged(int type, int index) {
        repaint();
.....

Original issue reported on code.google.com by jaanus_h...@hotmail.com on 5 Mar 2014 at 12:52

Attachments:

GoogleCodeExporter commented 9 years ago
I am having the same problem. I don't have a CheckBox, this is just a Dialog 
with two input fields and two buttons but the symptoms are exactly the same. I 
can open a separate bug report if you prefer.

I am preparing a new version of my CodenameOne apps and the code in question 
has not changed. Testing on both iOS7 and iOS8. I enter data in the TextField 
and when I touch the screen to dismiss the keyboard so that I can get to other 
areas on the screen, the TextField goes blank. The input is still there because 
if I try and use it I get the input. It seems to be a painting problem. While 
it doesn't happen every time, it does happen a lot. I don't feel I can update 
my apps with this problem in place.

Note: I am using ios.keyboardOpen=false because of problems with black screens 
when dismissing the keyboard. 

Original comment by mwarn...@readerware.com on 14 Dec 2014 at 7:35

GoogleCodeExporter commented 9 years ago
This bug seems fairly pervasive. I went through my apps and every TextField I 
have exhibits this problem when dismissing the keyboard on iOS. 

The good news is that the fix posted above resolved the issue for me.

Thanks.

Original comment by mwarn...@readerware.com on 16 Dec 2014 at 7:25