Skip to content

Commit

Permalink
Fixed #1436 - StyleClass does not open overlay when source is clicked…
Browse files Browse the repository at this point in the history
… again
  • Loading branch information
cagataycivici committed Aug 10, 2021
1 parent 41c7fd0 commit 0c16992
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/styleclass/StyleClass.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ function leave(target, binding) {
DomHandler.addClass(target, binding.value.leaveToClass);
}
}

if (binding.value.hideOnOutsideClick) {
unbindDocumentListener(target);
}
}

function resolveTarget(el, binding) {
Expand Down Expand Up @@ -138,7 +142,6 @@ function bindDocumentListener(target, el, binding) {
}
else if (!el.isSameNode(event.target) && !el.contains(event.target) && !target.contains(event.target)) {
leave(target, binding);
unbindDocumentListener(target);
}
}

Expand Down

0 comments on commit 0c16992

Please sign in to comment.