diff --git a/components/lib/image/Image.vue b/components/lib/image/Image.vue index 678b54e6c..47fd87a32 100644 --- a/components/lib/image/Image.vue +++ b/components/lib/image/Image.vue @@ -104,13 +104,9 @@ export default { this.previewClick = true; }, onMaskClick(event) { - const isActionbarTarget = [event.target.classList].includes('p-image-action') || event.target.closest('.p-image-action'); + const isBarActionsClicked = DomHandler.isAttributeEquals(event.target, 'data-pc-section-group', 'action') || event.target.closest('[data-pc-section-group="action"]'); - if (isActionbarTarget) { - return; - } - - if (!this.previewClick) { + if (!this.previewClick && !isBarActionsClicked) { this.previewVisible = false; this.rotate = 0; this.scale = 1; diff --git a/components/lib/image/style/ImageStyle.js b/components/lib/image/style/ImageStyle.js index 93259be8f..a6e9d82fd 100644 --- a/components/lib/image/style/ImageStyle.js +++ b/components/lib/image/style/ImageStyle.js @@ -50,6 +50,10 @@ const css = ` justify-content: center; align-items: center; } + + .p-image-action.p-disabled { + pointer-events: auto; + } .p-image-preview { transition: transform 0.15s;