openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

sap.m.Input: unexpected behaviors with maxLength and type filtering

Open cmastrandrea opened this issue 10 years ago • 1 comments

OpenUI5 version: latest

Browser/version (+device/version): Chrome, Firefox (latest)

Any other tested browsers/devices(OK/FAIL): IE 11 OK

URL (minimal example if possible): http://jsbin.com/vajolabuma/edit?html,js,output

User/password (if required and possible - do not post any confidential information here):

Steps to reproduce the problem:

  1. Bring up sample and enter '1', '2', '3', '.'
  2. Press another digit key (e.g. '4')
  3. Notice the input field gets cleared
  4. Enter '1', '.', '2', '3', '.', '4', '5', ...

What is the expected result? Expected that the fifth input would be ignored since maxLength is 4. Also expected that the 1.23.456 sequence wouldn't be allowed since it exceeds maxLength.

What happens instead? Entering the fifth input unexpectedly causes the field to be cleared. Entering the 1.23.456 sequence is allowed even though it exceeds maxLength and isn't a valid number. Also in Firefox, any character sequence/length appears to be allowed.

Any other information? (attach screenshot if possible)

cmastrandrea avatar Mar 17 '16 13:03 cmastrandrea

Thank you for the findings.

(3.) - bug: the entry should not be cleared. Internal incident is created.

(4. maxlength) - missing functionality. Inputs with type number should be used with max and min parameters which are not implemented in sap.m.Input

ulasenka avatar Mar 18 '16 12:03 ulasenka