remove enterkeyhint attribute as it prevents entering newlines on android

on Android, by default (without the above attribute set to "send"), you
press enter twice to submit a field. The first time, enter, Android
seems to prevent sending logic by setting the key property on the event
to "Unidentified", but does insert a newline. The second consecutive enter,
it will be set to "Enter" and we'll send.

Having enterkeyhint to send will disable all of that. So we're going with
the default behaviour, which, IIRC, was a bit annoying on iOS as well.
This commit is contained in:
Bruno Windels 2022-01-18 09:42:01 +01:00
parent acc9167991
commit e6fee75952

View file

@ -30,7 +30,6 @@ export class MessageComposer extends TemplateView {
render(t, vm) { render(t, vm) {
this._input = t.textarea({ this._input = t.textarea({
enterkeyhint: 'send',
onKeydown: e => this._onKeyDown(e), onKeydown: e => this._onKeyDown(e),
onInput: () => { onInput: () => {
vm.setInput(this._input.value); vm.setInput(this._input.value);