client/users: stop native completion

Disabled for user registration and editing where it causes more mess
than good.
This commit is contained in:
rr- 2016-08-22 21:43:59 +02:00
parent fec31d7946
commit 124e871022
4 changed files with 13 additions and 1 deletions

View file

@ -288,3 +288,7 @@ input[type=file]:focus+.file-dropper,
color: $button-enabled-text-color
.disabled
color: $inactive-link-color
.anticomplete
display: none

View file

@ -1,5 +1,8 @@
<div id='user-edit'>
<form>
<input class='anticomplete' type='text' name='fakeuser'/>
<input class='anticomplete' type='password' name='fakepass'/>
<ul class='input'>
<% if (ctx.canEditName) { %>
<li>

View file

@ -1,6 +1,9 @@
<div class='content-wrapper' id='user-registration'>
<h1>Registration</h1>
<form autocomplete='off'>
<input class='anticomplete' type='text' name='fakeuser'/>
<input class='anticomplete' type='password' name='fakepass'/>
<div class='input'>
<ul>
<li>

View file

@ -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'));
}
});
}