chrv-components 1.12.223 → 1.12.224
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
Binary file
|
|
@@ -4133,6 +4133,12 @@ class ChrPopoverDirective {
|
|
|
4133
4133
|
return mayBeTemplate;
|
|
4134
4134
|
}, /* @ts-ignore */
|
|
4135
4135
|
...(ngDevMode ? [{ debugName: "targetElementId" }] : /* istanbul ignore next */ []));
|
|
4136
|
+
this.isNativePopoverTrigger = computed(() => {
|
|
4137
|
+
const host = this.hostElement();
|
|
4138
|
+
return (host instanceof HTMLButtonElement ||
|
|
4139
|
+
(host instanceof HTMLInputElement && host.type === 'button'));
|
|
4140
|
+
}, /* @ts-ignore */
|
|
4141
|
+
...(ngDevMode ? [{ debugName: "isNativePopoverTrigger" }] : /* istanbul ignore next */ []));
|
|
4136
4142
|
this.updateLastKnownMousePosition = (event) => {
|
|
4137
4143
|
this.lastKnownMousePosition$.next({
|
|
4138
4144
|
x: event.clientX,
|
|
@@ -4198,6 +4204,8 @@ class ChrPopoverDirective {
|
|
|
4198
4204
|
return this.isInsideRect(x, y, rect);
|
|
4199
4205
|
};
|
|
4200
4206
|
effect(() => {
|
|
4207
|
+
if (!this.isNativePopoverTrigger())
|
|
4208
|
+
return;
|
|
4201
4209
|
const open = this.isOpen();
|
|
4202
4210
|
if (open)
|
|
4203
4211
|
this.showPopover();
|
|
@@ -4235,9 +4243,7 @@ class ChrPopoverDirective {
|
|
|
4235
4243
|
this.renderer.addClass(this.targetElement(), 'card');
|
|
4236
4244
|
this.renderer.addClass(this.targetElement(), 'glass');
|
|
4237
4245
|
this.renderer.setStyle(this.targetElement(), 'border', 'none');
|
|
4238
|
-
|
|
4239
|
-
(host instanceof HTMLInputElement && host.type === 'button');
|
|
4240
|
-
if (!this.chrPopoverOnHover() && !isNativePopoverTrigger) {
|
|
4246
|
+
if (!this.chrPopoverOnHover() && !this.isNativePopoverTrigger()) {
|
|
4241
4247
|
this.renderer.listen(this.hostElement(), 'click', () => {
|
|
4242
4248
|
if (this.isOpen()) {
|
|
4243
4249
|
this.isOpen.set(false);
|