Skip to content

Commit b6ee88a

Browse files
committed
Added button cleanup.
1 parent 2205492 commit b6ee88a

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

src/Gleap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ class Gleap {
295295
GleapReplayRecorder.getInstance().stop();
296296
GleapStreamedEvent.getInstance().stop();
297297
GleapFrameManager.getInstance().destroy();
298-
GleapFeedbackButtonManager.getInstance().toggleFeedbackButton(false);
298+
GleapFeedbackButtonManager.getInstance().destroy();
299299
GleapNotificationManager.getInstance().clearAllNotifications(true);
300300
GleapSession.getInstance().clearSession(0, false);
301301
GleapBannerManager.getInstance().removeBannerUI();

src/GleapFeedbackButtonManager.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ export default class GleapFeedbackButtonManager {
3030
return this.instance;
3131
}
3232

33+
destroy() {
34+
if (this.feedbackButton) {
35+
this.feedbackButton.remove();
36+
this.feedbackButton = null;
37+
}
38+
39+
this.buttonHidden = null;
40+
this.lastButtonIcon = null;
41+
this.injectedFeedbackButton = false;
42+
this.instance = null;
43+
}
44+
3345
/**
3446
* Toggles the feedback button visibility.
3547
* @param {*} show

0 commit comments

Comments
 (0)