Skip to content

Commit 0cd6afa

Browse files
committed
v13.6.4
1 parent a221dd5 commit 0cd6afa

File tree

6 files changed

+11
-10
lines changed

6 files changed

+11
-10
lines changed

build/cjs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/esm/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "13.6.3",
3+
"version": "13.6.4",
44
"main": "build/cjs/index.js",
55
"module": "build/esm/index.mjs",
66
"exports": {

published/13.6.4/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GleapTooltipManager.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function throttle(fn, time) {
1919
export default class GleapTooltipManager {
2020
tooltips = [];
2121
filteredTooltips = [];
22+
lastUrl = null;
2223
elementToFloatingUIMap = new WeakMap();
2324
elementToTooltipMap = new WeakMap();
2425
nextId = 0;
@@ -66,16 +67,15 @@ export default class GleapTooltipManager {
6667
return;
6768
}
6869

69-
if (window.navigation) {
70-
window.navigation.addEventListener("navigate", (event) => {
71-
self.updateFilteredTooltips();
72-
});
73-
}
74-
7570
const handleResizeThrottled = throttle(self.updateHotspotPositions.bind(self), 250);
7671
window.addEventListener('resize', handleResizeThrottled);
7772

7873
this.observer = new MutationObserver((mutations) => {
74+
if (self.lastUrl !== window.location.href) {
75+
self.lastUrl = window.location.href;
76+
self.filteredTooltips = self.getFilteredTooltips();
77+
}
78+
7979
mutations.forEach((mutation) => {
8080
// Check for added nodes
8181
mutation.addedNodes.forEach((node) => {

0 commit comments

Comments
 (0)