Skip to content

Commit

Permalink
Pull request: AG-14149 Keep focus on filters search if all symbols ha…
Browse files Browse the repository at this point in the history
…s been deleted

Merge in EXTENSIONS/safari-app-extension from fix/AG-14149 to master

Squashed commit of the following:

commit aa3b8c6 [formerly 3d56870cb2bf208db7424f0fdb3d05d7fc5233fd]
Merge: da8e74a5 e3ecc938
Author: tvinzz <o.labudko@adguard.com>
Date:   Thu May 5 23:02:44 2022 +0700

    Merge branch 'master' into fix/AG-14149

commit d025900 [formerly da8e74a54ee8130b406ba5d5ac9fc62cf0aeadc0]
Merge: ccfb167c e8637c90
Author: tvinzz <o.labudko@adguard.com>
Date:   Thu May 5 20:02:37 2022 +0700

    Merge branch 'master' into fix/AG-14149

commit 1912790 [formerly ccfb167ca41cb7c080cbcfeb867c24625cdcda8e]
Author: tvinzz <o.labudko@adguard.com>
Date:   Thu May 5 18:51:19 2022 +0700

    fixed empty search input focus


Former-commit-id: 1d861a27123ba73635dbe598230b91dd081a187a
  • Loading branch information
tvinzz committed May 5, 2022
1 parent 715e675 commit e39cac4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ const AntiBannerFilters = function (options, contentBlockerInfo, environmentOpti
type="text"
placeholder="${i18n.__('options_filters_list_search_placeholder.message')}"
name="searchFiltersList"
tabindex="0"
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ function initFiltersSearch(category, renderCategoryFilters) {
return;
}

// https://github.com/AdguardTeam/AdGuardForSafari/issues/711
// keep focus on search input if all search symbols has been deleted
searchInput.focus();

const filtersContainer = document.querySelector(`#antibanner${category.groupId} .opts-list`);
const filters = filtersContainer.querySelectorAll('li');

Expand Down

0 comments on commit e39cac4

Please sign in to comment.