[ 
https://issues.apache.org/jira/browse/CB-13242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160983#comment-16160983
 ] 

martin Cooper commented on CB-13242:
------------------------------------

Hi Joe,

Thanks for your reply, answers inline:



We need a lot more information regarding this issue, such as:

What versions of Android are you running this code on?

Android Version 7.0



Is this on an actual device or emulator?

This only happens on the actual device - Galaxy Tab S2 Model Number SM-T819 
running Android 7.0. Unfortunately it is the only device / OS I have access to. 
I can send you the .APK I am creating for the device, if that is any use.

I am using Visual Studio as my development environment and if I choose 
“Simulate in browser – Nexus 10 (Tablet)” to deploy to, the maxlength 
functionality works fine. This is the only emulator I can get to work.



What versions of Chrome for Android are you running this on?

Since it is a local app (i.e. an APK) I don’t think I can run it under chrome 
can I ? The app is not installed on a web server anywhere for me to consume it 
from a browser (is that what you meant ?) FWIW Chrome is installed on the 
tablet and its version is 61.0.3163.81



Does this do this in Google Chrome for Android?

See above



Thanks again,

Martin





> SAP UI5 sap.m.Input maxLength issue
> -----------------------------------
>
>                 Key: CB-13242
>                 URL: https://issues.apache.org/jira/browse/CB-13242
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-android
>    Affects Versions: 6.3.1
>         Environment: Visual Studio Enterprise 2017
> Visual Studio Tools for Apache Cordova   15.113.6201.1 
> Toolset Name Cordova 6.3.1
> Cordova-android 5.2.1
> OpenUI5 Distribution: "version": "1.46.7" buildTimestamp: "201705020902"
>            Reporter: martin Cooper
>            Assignee: Joe Bowser
>            Priority: Minor
>              Labels: UI5
>
> I have created a hello world UI5 app using a sap.m.input as below:
> var myinput1 = new sap.m.Input("myinput_1", {maxLength: 10});
> My hello world app works fine on a desktop, but when I use Cordova to compile 
> it for android, maxlength does not work properly - you can type as many 
> characters as you like so long as you don’t enter a space. Once you have 
> entered more than maxLength characters, if you enter a space, the string is 
> truncated to maxLength.
> The desktop version of the app is available here:
> http://jsfiddle.net/dn5c3z6j/
> As a workaround I have added a liveChange event to all my sap.m.Input 
> controls as follows:
> var myinput1 = new sap.m.Input("myinput_1", {liveChange: function (event) { 
> setmaxLength(10, event) }, maxLength: 10});
> function setmaxLength(len, event) {
>     if (event.mParameters.value.length > len) {
>         event.oSource.setValue();//for some reason the value needs to be 
> cleared before it can be changed
>         event.oSource.setValue(event.getParameters().value);
>     }
> }



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to