azerion / phaser-input

Adds input boxes to Phaser like CanvasInput, but also works for WebGL and Mobile, made for Phaser only.
MIT License
201 stars 64 forks source link

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

Open ghost opened 6 years ago

ghost commented 6 years ago

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.

AleBles commented 6 years ago

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?

RaheelYawar commented 5 years ago

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.