From 124e871022369604da9893581f6006c61f469a0b Mon Sep 17 00:00:00 2001 From: rr- Date: Mon, 22 Aug 2016 21:43:59 +0200 Subject: [PATCH] client/users: stop native completion Disabled for user registration and editing where it causes more mess than good. --- client/css/forms.styl | 4 ++++ client/html/user_edit.tpl | 3 +++ client/html/user_registration.tpl | 3 +++ client/js/views/user_edit_view.js | 4 +++- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/client/css/forms.styl b/client/css/forms.styl index 11e7f91..6e60c4c 100644 --- a/client/css/forms.styl +++ b/client/css/forms.styl @@ -288,3 +288,7 @@ input[type=file]:focus+.file-dropper, color: $button-enabled-text-color .disabled color: $inactive-link-color + + +.anticomplete + display: none diff --git a/client/html/user_edit.tpl b/client/html/user_edit.tpl index 88d6037..d518aab 100644 --- a/client/html/user_edit.tpl +++ b/client/html/user_edit.tpl @@ -1,5 +1,8 @@
+ + +
    <% if (ctx.canEditName) { %>
  • diff --git a/client/html/user_registration.tpl b/client/html/user_registration.tpl index 9db35ce..5832118 100644 --- a/client/html/user_registration.tpl +++ b/client/html/user_registration.tpl @@ -1,6 +1,9 @@

    Registration

    + + +
    • diff --git a/client/js/views/user_edit_view.js b/client/js/views/user_edit_view.js index 078a292..28208ea 100644 --- a/client/js/views/user_edit_view.js +++ b/client/js/views/user_edit_view.js @@ -33,7 +33,9 @@ class UserEditView extends events.EventTarget { for (let node of this._formNode.querySelectorAll('input, select')) { node.addEventListener( 'change', e => { - this.dispatchEvent(new CustomEvent('change')); + if (!e.target.classList.contains('anticomplete')) { + this.dispatchEvent(new CustomEvent('change')); + } }); }