Skip to content

Commit

Permalink
Fix visually glitchy Create button in element picker
Browse files Browse the repository at this point in the history
The Create button was being unduly enabled for a fraction of
second while editing the content of the filter text.

This commit is candidate for a revision to current stable
release.
  • Loading branch information
gorhill committed Feb 9, 2022
1 parent 428e4b8 commit 80f58a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/js/epicker-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ const onCandidateChanged = function() {
const filter = filterFromTextarea();
const bad = filter === '!';
$stor('section').classList.toggle('invalidFilter', bad);
$id('create').disabled = bad;
if ( bad ) {
$id('resultsetCount').textContent = 'E';
$id('create').setAttribute('disabled', '');
Expand Down Expand Up @@ -767,7 +766,7 @@ const showDialog = function(details) {

dialog.querySelector('ul').style.display =
netFilters.length || cosmeticFilters.length ? '' : 'none';
dialog.querySelector('#create').disabled = true;
$id('create').setAttribute('disabled', '');

// Auto-select a candidate filter

Expand Down

0 comments on commit 80f58a6

Please sign in to comment.