Merge pull request #335 from tawfiek/add-enterkeyhint

Add enterkeyhint
This commit is contained in:
Bruno Windels 2021-04-30 14:28:38 +00:00 committed by GitHub
commit 408fc29314
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View file

@ -32,6 +32,7 @@ class FilterField extends TemplateView {
placeholder: options?.label,
"aria-label": options?.label,
autocomplete: options?.autocomplete,
enterkeyhint: 'search',
name: options?.name,
onInput: event => options.set(event.target.value),
onKeydown: event => {

View file

@ -28,6 +28,7 @@ export class MessageComposer extends TemplateView {
render(t, vm) {
this._input = t.input({
placeholder: vm.isEncrypted ? "Send an encrypted message…" : "Send a message…",
enterkeyhint: 'send',
onKeydown: e => this._onKeyDown(e),
onInput: () => vm.setInput(this._input.value),
});