summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/profile-conditions-ui.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-12-20 11:27:05 -0500
committerGitHub <noreply@github.com>2020-12-20 11:27:05 -0500
commit113e3b68b8c8399e0899740a52cc7fa3b38658cc (patch)
treea2fc3d89938f09034ebfe9e62b732bf3602633c0 /ext/bg/js/settings/profile-conditions-ui.js
parent6d7eefa9df0fbb6fe04b2e417aed78ac25c88541 (diff)
Improve styles for invalid inputs (#1143)
Diffstat (limited to 'ext/bg/js/settings/profile-conditions-ui.js')
-rw-r--r--ext/bg/js/settings/profile-conditions-ui.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bg/js/settings/profile-conditions-ui.js b/ext/bg/js/settings/profile-conditions-ui.js
index 78155467..256130ca 100644
--- a/ext/bg/js/settings/profile-conditions-ui.js
+++ b/ext/bg/js/settings/profile-conditions-ui.js
@@ -614,7 +614,7 @@ class ProfileConditionUI {
}
this._value = value;
- node.classList.remove('is-invalid');
+ delete node.dataset.invalid;
node.type = inputType;
if (inputValue !== null) {
node.value = inputValue;
@@ -634,7 +634,7 @@ class ProfileConditionUI {
_validateValue(value, validate) {
const okay = (validate === null || validate(value));
- this._valueInput.classList.toggle('is-invalid', !okay);
+ this._valueInput.dataset.invalid = `${!okay}`;
return okay;
}