From 80f58a6357db47bf2c9c13e2c9adaa8689b4aa80 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 9 Feb 2022 07:37:40 -0500 Subject: [PATCH] Fix visually glitchy Create button in element picker 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. --- src/js/epicker-ui.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js/epicker-ui.js b/src/js/epicker-ui.js index 5cbbc1d1f..08476aedc 100644 --- a/src/js/epicker-ui.js +++ b/src/js/epicker-ui.js @@ -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', ''); @@ -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