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

suggestion to update read me and add couple of signals to improve plugin #61

Open YehudaK opened 6 years ago

YehudaK commented 6 years ago

It's worth to mention in read me that text for such input should be set only via "setText()" method. Otherwise, once stage gets any tap, contents of input is automatically erased (since dom input is empty). Also reading data from input should be done via "value" property.

Finally, it will be just couple of lines of code to add two more signals: onFocusIn and onFocusOut which developers could use to handle when user finished typing... as you do not trigger keyboard closed for desktop intentionally (which has no reason, unless you intentionally do not want people use your code).

Thanks

p.s. if you need, I can tell you where to make changes or even modify parser-input.js file. I can make pull requests if needed but I prefer native git repositories rather github