diff --git a/src/components/styleclass/StyleClass.js b/src/components/styleclass/StyleClass.js index 43be415ce..871232c54 100644 --- a/src/components/styleclass/StyleClass.js +++ b/src/components/styleclass/StyleClass.js @@ -137,7 +137,7 @@ function resolveTarget(el, binding) { function bindDocumentListener(target, el, binding) { if (!target.$p_styleclass_documentlistener) { target.$p_styleclass_documentlistener = (event) => { - if (isVisible(target) || getComputedStyle(target).getPropertyValue('position') === 'static') { + if (!isVisible(target) || getComputedStyle(target).getPropertyValue('position') === 'static') { unbindDocumentListener(target); }