Skip to content

Commit af9eb39

Browse files
committed
fix(overlay): force svg.use tags to be with pointer-events: none, #4901
1 parent 52f0047 commit af9eb39

File tree

9 files changed

+13
-11
lines changed

9 files changed

+13
-11
lines changed

projects/igniteui-angular/src/lib/core/styles/components/icon/_icon-theme.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
width: inherit;
6262
height: inherit;
6363
fill: currentColor;
64+
65+
use {
66+
pointer-events: none;
67+
}
6468
}
6569
}
6670

projects/igniteui-angular/src/lib/services/overlay/overlay.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,12 +623,10 @@ export class IgxOverlayService implements OnDestroy {
623623
// if the click is on the element do not close this overlay
624624
if (!info.elementRef.nativeElement.contains(ev.target)) {
625625
// if we should exclude position target check if the click is over it. If so do not close overlay
626-
const positionTarget = info.settings.positionStrategy.settings.target as HTMLElement;
626+
const positionTarget = info.settings.positionStrategy.settings.target as any;
627627
let clickOnPositionTarget = false;
628628
if (positionTarget) {
629-
const positionTargetRect = positionTarget.getBoundingClientRect();
630-
clickOnPositionTarget = ev.clientX >= positionTargetRect.left && ev.clientX <= positionTargetRect.right &&
631-
ev.clientY >= positionTargetRect.top && ev.clientY <= positionTargetRect.bottom;
629+
clickOnPositionTarget = positionTarget.contains(ev.target);
632630
}
633631

634632
if (!(info.settings.excludePositionTarget && clickOnPositionTarget)) {

src/assets/svg/filtering/contains.svg

Lines changed: 1 addition & 1 deletion
Loading

src/assets/svg/filtering/does_not_contain.svg

Lines changed: 1 addition & 1 deletion
Loading

src/assets/svg/filtering/does_not_equal.svg

Lines changed: 1 addition & 1 deletion
Loading

src/assets/svg/filtering/ends_with.svg

Lines changed: 1 addition & 1 deletion
Loading

src/assets/svg/filtering/equals.svg

Lines changed: 1 addition & 1 deletion
Loading

src/assets/svg/filtering/is_empty.svg

Lines changed: 1 addition & 1 deletion
Loading

src/assets/svg/filtering/starts_with.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)