1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 01:59:38 +02:00

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.
This commit is contained in:
Raymond Hill 2022-02-09 07:37:40 -05:00
parent 428e4b8777
commit 80f58a6357
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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