Skip to content

Commit

Permalink
Refs #131234 Use is when referring to event.target
Browse files Browse the repository at this point in the history
  • Loading branch information
Petchesi-Iulian committed Sep 15, 2021
1 parent aa9d6a9 commit 9700294
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions copernicus/public/custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ function searchModifications() {
});

$(document).click(function(event) {
if ($("#facetview_trees_loader").is(":hidden") == false && !event.target.matches('.eea-section-trigger')) {
if ($("#facetview_trees_loader").is(":hidden") == false && !event.target.is('.eea-section-trigger')) {

targets = ["#facetview_trees_loader", ".eea-right-section-active"];

if (!event.target.matches(targets) ||
if (!event.target.is(targets) ||
!event.target.closest(targets))
{
event.preventDefault();
Expand Down

0 comments on commit 9700294

Please sign in to comment.