javascript - How to prevent linefeed when hit enter on Firefox OS mobile phone -
i want use return key submit something. how prevent linefeed. don't want produce '\r' or '\n'.
i used code like:
if(e.keycode == 13){ if(textcontent != ""){submit();} //e.preventdefault(); //e.stoppropation(); e.returnvalue = false; return false; }
i don't want make new row.
your code (you don't need e.returnvalue), have use on keydown event, not keyup.
Comments
Post a Comment