phaser-input icon indicating copy to clipboard operation
phaser-input copied to clipboard

inputOptions.max and inputOptions.forceCase doesn't work properly

Open ghost opened this issue 8 years ago • 2 comments

If I follow the documentation and enter something like the following code

this.pointInput = game.add.inputField(300, 300, {
  type: 'text',
  forceCase: 'upper',
  max: '6',
});

It doesn't force the upper case and it also doesn't limit the length of entered text to 6 charactes as expected. In order to let forceCase work, you need to enter forceCase: 2.

the max property works only with number fields properly. It doesn't limit the amount of characters in type: 'text' as I expected.

ghost avatar Jul 27 '17 13:07 ghost

So I've updated the documentation regarding the forceCase issue, max however should limit the amount of characters for text object, and from what I can see in the example it also work (Username input field limited to 20 characters) could you provide and example where it doesn't happen?

AleBles avatar Oct 12 '17 08:10 AleBles

The max property not limiting the number of characters happens on the Chrome browser on Android devices.

It works fine on Chrome with Windows 10 and Chrome with iOS.

RaheelYawar avatar Mar 01 '19 10:03 RaheelYawar