cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "martin Cooper (JIRA)" <>
Subject [jira] [Created] (CB-13242) SAP UI5 sap.m.Input maxLength issue
Date Tue, 05 Sep 2017 14:37:00 GMT
martin Cooper created CB-13242:

             Summary: SAP UI5 sap.m.Input maxLength issue
                 Key: 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

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:

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

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message