@product7/feedback-sdk 1.4.5 → 1.4.7
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.
package/dist/feedback-sdk.js
CHANGED
|
@@ -2202,6 +2202,21 @@
|
|
|
2202
2202
|
const button = this.element.querySelector('.feedback-trigger-btn');
|
|
2203
2203
|
const minimizeIcon = this.element.querySelector('.feedback-minimize-icon');
|
|
2204
2204
|
const expandIcon = this.element.querySelector('.feedback-expand-icon');
|
|
2205
|
+
const isControlIcon = (target) => {
|
|
2206
|
+
if (!(target instanceof Element)) return false;
|
|
2207
|
+
return Boolean(
|
|
2208
|
+
target.closest('.feedback-minimize-icon') ||
|
|
2209
|
+
target.closest('.feedback-expand-icon')
|
|
2210
|
+
);
|
|
2211
|
+
};
|
|
2212
|
+
const openIfAllowed = (target) => {
|
|
2213
|
+
if (isControlIcon(target)) {
|
|
2214
|
+
return;
|
|
2215
|
+
}
|
|
2216
|
+
if (!this.isMinimized) {
|
|
2217
|
+
this.openPanel();
|
|
2218
|
+
}
|
|
2219
|
+
};
|
|
2205
2220
|
|
|
2206
2221
|
minimizeIcon.addEventListener('click', (e) => {
|
|
2207
2222
|
e.stopPropagation();
|
|
@@ -2216,16 +2231,13 @@
|
|
|
2216
2231
|
});
|
|
2217
2232
|
|
|
2218
2233
|
button.addEventListener('click', (e) => {
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
e.target.closest('.feedback-expand-icon')
|
|
2222
|
-
) {
|
|
2223
|
-
return;
|
|
2224
|
-
}
|
|
2234
|
+
openIfAllowed(e.target);
|
|
2235
|
+
});
|
|
2225
2236
|
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2237
|
+
// Pointer events improve consistency across touch and mouse devices.
|
|
2238
|
+
button.addEventListener('pointerup', (e) => {
|
|
2239
|
+
if (e.pointerType === 'mouse') return;
|
|
2240
|
+
openIfAllowed(e.target);
|
|
2229
2241
|
});
|
|
2230
2242
|
}
|
|
2231
2243
|
|
|
@@ -8862,7 +8874,7 @@
|
|
|
8862
8874
|
const feedbackStyles = `
|
|
8863
8875
|
.feedback-widget-button {
|
|
8864
8876
|
position: fixed;
|
|
8865
|
-
z-index: var(--z-
|
|
8877
|
+
z-index: var(--z-notification);
|
|
8866
8878
|
}
|
|
8867
8879
|
|
|
8868
8880
|
.feedback-widget-button.position-bottom-right {
|
|
@@ -8904,6 +8916,8 @@
|
|
|
8904
8916
|
background: var(--color-primary);
|
|
8905
8917
|
box-shadow: var(--shadow-md);
|
|
8906
8918
|
width: fit-content;
|
|
8919
|
+
touch-action: manipulation;
|
|
8920
|
+
-webkit-tap-highlight-color: transparent;
|
|
8907
8921
|
}
|
|
8908
8922
|
|
|
8909
8923
|
.feedback-trigger-btn:hover:not(:disabled) {
|
|
@@ -8942,6 +8956,7 @@
|
|
|
8942
8956
|
transition: opacity var(--transition-base);
|
|
8943
8957
|
box-shadow: var(--shadow-sm);
|
|
8944
8958
|
cursor: pointer;
|
|
8959
|
+
pointer-events: none;
|
|
8945
8960
|
}
|
|
8946
8961
|
|
|
8947
8962
|
.feedback-minimize-icon svg,
|
|
@@ -8954,6 +8969,7 @@
|
|
|
8954
8969
|
|
|
8955
8970
|
.feedback-widget-button:not(.minimized) .feedback-trigger-btn:hover .feedback-minimize-icon {
|
|
8956
8971
|
opacity: 1;
|
|
8972
|
+
pointer-events: auto;
|
|
8957
8973
|
}
|
|
8958
8974
|
|
|
8959
8975
|
.feedback-widget-button.minimized .feedback-trigger-btn {
|
|
@@ -8973,6 +8989,7 @@
|
|
|
8973
8989
|
|
|
8974
8990
|
.feedback-widget-button.minimized .feedback-trigger-btn:hover .feedback-expand-icon {
|
|
8975
8991
|
opacity: 1;
|
|
8992
|
+
pointer-events: auto;
|
|
8976
8993
|
}
|
|
8977
8994
|
|
|
8978
8995
|
.feedback-panel {
|