diff --git a/src/platform/web/ui/session/leftpanel/LeftPanelView.js b/src/platform/web/ui/session/leftpanel/LeftPanelView.js index fb2feb5711..60fd3a208d 100644 --- a/src/platform/web/ui/session/leftpanel/LeftPanelView.js +++ b/src/platform/web/ui/session/leftpanel/LeftPanelView.js @@ -1,5 +1,6 @@ /* Copyright 2020 Bruno Windels +Copyright 2024 Mirian Margiani Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -32,7 +33,10 @@ class FilterField extends TemplateView { type: "text", placeholder: options?.label, "aria-label": options?.label, - autocomplete: options?.autocomplete, + autocomplete: "new-password", + spellcheck: "false", + autocorrect: "off", + readonly: true, enterkeyhint: 'search', name: options?.name, onInput: event => options.set(event.target.value), @@ -41,7 +45,10 @@ class FilterField extends TemplateView { clear(); } }, - onFocus: () => filterInput.select() + onFocus: () => { + filterInput.removeAttribute("readonly"); + filterInput.select(); + }, }); const clearButton = t.button({ onClick: clear, diff --git a/src/platform/web/ui/session/settings/KeyBackupSettingsView.ts b/src/platform/web/ui/session/settings/KeyBackupSettingsView.ts index 4b60bfc650..aaaa7209ff 100644 --- a/src/platform/web/ui/session/settings/KeyBackupSettingsView.ts +++ b/src/platform/web/ui/session/settings/KeyBackupSettingsView.ts @@ -1,5 +1,6 @@ /* Copyright 2020 The Matrix.org Foundation C.I.C. +Copyright 2024 Mirian Margiani Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -118,7 +119,16 @@ function renderEnableFromPhrase(t: Builder, vm: KeyBackupVie function renderEnableFieldRow(t, vm, label, callback): ViewNode { let setupDehydrationCheck; const eventHandler = () => callback(input.value, setupDehydrationCheck?.checked || false); - const input = t.input({type: "password", disabled: vm => vm.isBusy, placeholder: label}); + const input = t.input({ + type: "password", + disabled: vm => vm.isBusy, + placeholder: label, + autocomplete: "new-password", + spellcheck: "false", + autocorrect: "off", + readonly: true, + onFocus: () => input.removeAttribute("readonly"), + }); const children = [ t.p([ input,