nihad640 / smartgwt

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

TextItem selection issue on Android #628

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

I'm opening this bug following discussions on the forum available at: 
http://forums.smartclient.com/showthread.php?t=18377. 

The issue is that TextItem cannot be selected on all Android devices we've been 
able to try. Basically the TextItem field doesn't get focus when touched. Note 
that the same problem occurs with both the SmartGWT and SmartClient showcases.

Here's the test case:

public void onModuleLoad()
{
    testScreen();
}

public void testScreen()
{

    TextItem textItem1 = new TextItem();
    textItem1.setTitle("Name");

    TextItem textItem2 = new TextItem();
    textItem2.setTitle("Phone");

    DynamicForm form = new DynamicForm();
    form.setNumCols(2);
    form.setMargin(20);
    form.setWidth(200);
    form.setItems(textItem1, textItem2);

    VLayout panel = new VLayout();
    panel.setPadding(15);
    panel.addMember(form);

    panel.draw();
}

What steps will reproduce the problem?
1. As mentionned above, touching either fields doesn't set focus to it

What is the expected output? What do you see instead?
The field is expected to get focus and the keyboard should popup. Instead, the 
field doesn't get focus and the keyboard doesn't popup.

What version of the product are you using? On what operating system?
SmartGWT 2.5 on the following Android devices:

Device: Acer Iconia Tab
OS version as displayed by the device: Android 3.0.1
Kernel version as displayed by the device: 2.6.36.3

Device: Google Nexus S
OS version as displayed by the device: Android 2.3.4
Kernel version as displayed by the device: 2.6.35.7-ge382d80 
android-build@apa28 #1

Device: Asus eeePad Transformer
OS version as displayed by the device: Android 3.2
Kernel version as displayed by the device: 2.6.36.3-00003-g9baf8f7 
android@Mercury #1

Device: 12th revision of the Android SDK Emulator

What browser(s) does this happen in?  Are there any browsers where the
issue does not occur?
Android default browser as well as Firefox 6.0.2 on Android. The issue doesn't 
happen on any other operating system.

Please provide any additional information below.
Some devices have erratic behaviour in that the focus is sometimes successfully 
set. This rarely happens but is worth noting.

Let me know if anything else is needed.

Thanks,
Matthieu Siggen

Original issue reported on code.google.com by matthieu...@gmail.com on 19 Sep 2011 at 2:34

GoogleCodeExporter commented 9 years ago
Note that this was not reproducible on a physical Samsung Galaxy Tab (Android 
3.1) or the Galaxy Tab emulator.

We've tracked this to a bug in the browsers on these devices where they report 
screen size shrinkage when the virtual keyboard appears, and worked around it 
by ignoring such reports.

Please confirm the fix.

Original comment by smartgwt...@gmail.com on 20 Sep 2011 at 6:22

GoogleCodeExporter commented 9 years ago
Hi, 

I've retried the example above using the latest nightlies of SmartGWT 2.5 and 
3.0 (2011-09-21). Unfortunately the two TextItems still cannot be selected. 

Note that no message is added to the debug console. I can also confirm that 
changing the Android default browser user agent string to iPad fixes the issue. 
I unfortunately cannot use this workaround as the application end users aren't 
necessarily technically minded.

Thanks,
Matthieu

Original comment by matthieu...@gmail.com on 22 Sep 2011 at 4:52

GoogleCodeExporter commented 9 years ago
That really makes no sense at all.  What device are you talking about, and what 
user-agent string was it sending before you modified it?

Also, how are you modifying the user-agent string?

Are you really using physical devices as we are, or are you using some kind of 
emulator that purports to mimic these devices?

Original comment by smartgwt...@gmail.com on 22 Sep 2011 at 3:42

GoogleCodeExporter commented 9 years ago
I tried the nightly builds (2011-09-21) with the first two physical devices 
listed in the bug request above. I can also confirm that both these devices are 
real, physical devices. The user agent string was set to Android for the test 
(this is the default value).

I changed the user agent on the Iconia Tab by doing the following:
- type "about:debug" in the browser bar. This doesn't display a page but adds 
new options in the browser settings
- go to the browser settings
- choose the debug menu
- select UAString
- change it from Android to iPad

Note that this process is slightly different yet similar on the Google Nexus S.

You mentioned your physical test devices in the plural form. I know you have a 
Galaxy tab but as it is banned in Australia another device would mean that we 
may be able to find a common device. Are you using another one?

Thanks,
Matthieu

Original comment by matthieu...@gmail.com on 23 Sep 2011 at 1:29

GoogleCodeExporter commented 9 years ago
We also have an Asus eePad and a number of phones, where we confirmed the bug 
as fixed.

Again, can you tell us what User-Agent strings the Ionia Tab and Nexus Tab are 
sending?  Possibly they are not being detected as Android devices at all.

Original comment by smartgwt...@gmail.com on 23 Sep 2011 at 1:43

GoogleCodeExporter commented 9 years ago
This is very strange. I still have the issue on both devices. I don't have 
access to the eeePad transformer anymore as the colleague who lent it to me is 
on his way to Canada. 

The user agent strings are the following:
Acer Iconia Tab:
User-Agent: Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; A501 Build/HRI66) 
AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13

Google Nexus S:
User-Agent: Mozilla/5.0 (Linux; U; Android 2.3.4; en-gb; Nexus S Build/GRJ22) 
AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

Does this help?

Original comment by matthieu...@gmail.com on 23 Sep 2011 at 4:16

GoogleCodeExporter commented 9 years ago
I realised that I forgot to mention above that my latest tests were on SmartGWT 
2.5 nightly build for 2011-09-21 and 2011-09-22. Is the fix expected to be in 
one of those builds?

Is there a publicly availabe server that contains the fix (eg. a nightly 
deployment of the showcase)? That would allow me to test directly from a shop 
instead of needing a device that is part of our internal network.

I've also just tested without success SmartGWT 2.5 nightly build of 2011-09-22 
on an HTC Desire and a Samsung Galaxy S II. The same issue occured. The user 
agent strings are as follow:
HTC Desire:
User-Agent: Mozilla/5.0 (Linux; U; Android 2.2; en-au; HTC_Desire_A8183 
V2.26.841.2 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 
Mobile Safari/533.1
Samsung Galaxy S II:
User-Agent: Mozilla/5.0 (Linux; U; Android 2.3.3; en-gb; GT-I9100 
Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile 
Safari/533.1

As far as I'm aware, all the devices I listed were bought in Australia.

Original comment by matthieu...@gmail.com on 23 Sep 2011 at 4:48

GoogleCodeExporter commented 9 years ago
The patch was to 3.x only so far, so please test there, thanks.

Original comment by smartgwt...@gmail.com on 23 Sep 2011 at 5:58

GoogleCodeExporter commented 9 years ago
Oh and just for completeness - those User-Agent strings are correctly 
recognized as an Android mobile device.  But this wouldn't matter for 2.5.x 
because it did not have the workaround.

Original comment by smartgwt...@gmail.com on 23 Sep 2011 at 6:00

GoogleCodeExporter commented 9 years ago
I've just tested the following nightly builds for 3.x: 2011-09-21, 2011-09-22 
and 2011-09-25. It still doesn't work. 

Could it be that you are using a different version of GWT? We're using GWT 
2.3.0.

Original comment by matthieu...@gmail.com on 25 Sep 2011 at 11:47

GoogleCodeExporter commented 9 years ago
Also the latest tests were on the Acer Iconia Tab and Google Nexus S.

Original comment by matthieu...@gmail.com on 26 Sep 2011 at 7:07

GoogleCodeExporter commented 9 years ago
On what device(s) did you get a result where faking an iPad User-Agent string 
fixed the problem?

Original comment by smartgwt...@gmail.com on 26 Sep 2011 at 5:41

GoogleCodeExporter commented 9 years ago
I've added below the requested information:

Acer Iconia Tab with the following iPad user agent string:
User-Agent: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) 
AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 
Safari/531.21.10

Google Nexus S:
User-Agent: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) 
AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 
Safari/531.21.10

Original comment by matthieu...@gmail.com on 26 Sep 2011 at 10:50

GoogleCodeExporter commented 9 years ago
Aha - we're reproducing it now. 
No fix yet but we'll let you know as soon as we have it nailed (unless it turns 
out to be really obscure, should be the next couple of days / this week).

Original comment by smartgwt...@gmail.com on 27 Sep 2011 at 5:13

GoogleCodeExporter commented 9 years ago
Great news! I'm looking forward to the fix.

Original comment by matthieu...@gmail.com on 27 Sep 2011 at 6:28

GoogleCodeExporter commented 9 years ago
Hi, is this issue already fixed or not ? Which nightly build ?

Original comment by jozef.ch...@gmail.com on 2 Oct 2011 at 10:53

GoogleCodeExporter commented 9 years ago
Still working on it, lots of issues from customers will support plans at the 
moment.

Original comment by smartgwt...@gmail.com on 2 Oct 2011 at 6:02

GoogleCodeExporter commented 9 years ago
We believe this is now resolved. Please try the next nightly build (Dated Oct 5 
or greater) and let us know if you still see the problem.

Original comment by smartgwt...@gmail.com on 4 Oct 2011 at 10:59

GoogleCodeExporter commented 9 years ago
Fantastic!

I've just tested the 5th of October nightly build and it's now working.

Thanks a lot,

Matthieu

Original comment by matthieu...@gmail.com on 5 Oct 2011 at 11:50