textarea keypress

Hi,

I am trying to use a textarea view like twitter does with their twits…

I have a maxlength and i am comparing event´s return code in order to add or remove a space to write.

I have this snippet: http://webix.com/snippet/001469aa

2 questions:

  1. maxlength attribute does not work if the event is implemented. If i remove it, it works but if i have it… then maxlength does not work. Why?

  2. In this snippet, return code is right but in my mobile, always returns 0 except with enter key that returns a 13. However same code in the snippet works fine.
    I have a 4.4.2 android mobile.

Thanks and regards!

(1) The maxlength works smoothly regardless of the attached event. The only issue I spotted on mobile is that characters can be exceed maxlength if typing continuously. But it repeats with a standalone HTML textarea element, so the problem lies not within Webix.

(2) Key codes work fine for me as well. Could you please check them on some outer resource, e.g. http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes?

hi

i found something…that i am investigating. Is this.

I tried my code in iphone and android simulator and perfectly works.

I tried that page you shared to me on my phone and always returns me 229 code.

As my app always returns me a 0 and webbrowser returns me 229 i have searched in google and i think it is because chrome browser…

So, i dealing with this…

I will keep you posted!

regards!

Hi,

i realised that if i turn off “next-work suggestions”, “auto-correction” and “show correction suggestions” in my android configuration that maxlength property correctly works.

so, i have a textarea which maxlength property only works if i turn off those configurations and a keypress event that always returns a 0 code so i can not idetify if the user press backspace key. I just need that key.

So, what can i do?

Tnanks and regards!