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, placeholder: options?.label,
"aria-label": options?.label, "aria-label": options?.label,
autocomplete: options?.autocomplete, autocomplete: options?.autocomplete,
enterkeyhint: 'search',
name: options?.name, name: options?.name,
onInput: event => options.set(event.target.value), onInput: event => options.set(event.target.value),
onKeydown: event => { onKeydown: event => {

View File

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