summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/feature_highlight/feature_highlight.js4
-rw-r--r--app/assets/javascripts/milestone.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/app/assets/javascripts/feature_highlight/feature_highlight.js b/app/assets/javascripts/feature_highlight/feature_highlight.js
index 139d7826118..2d5bae9a9c4 100644
--- a/app/assets/javascripts/feature_highlight/feature_highlight.js
+++ b/app/assets/javascripts/feature_highlight/feature_highlight.js
@@ -31,8 +31,8 @@ export function setupFeatureHighlightPopover(id, debounceTimeout = 300) {
.on('mouseenter', mouseenter)
.on('mouseleave', debouncedMouseleave(debounceTimeout))
.on('inserted.bs.popover', inserted)
- .one('show.bs.popover', () => {
- window.addEventListener('scroll', hideOnScroll);
+ .on('show.bs.popover', () => {
+ window.addEventListener('scroll', hideOnScroll, { once: true });
})
// Display feature highlight
.removeAttr('disabled');
diff --git a/app/assets/javascripts/milestone.js b/app/assets/javascripts/milestone.js
index d3697eb0999..325fa570f37 100644
--- a/app/assets/javascripts/milestone.js
+++ b/app/assets/javascripts/milestone.js
@@ -61,8 +61,8 @@ export default class Milestone {
})
.on('mouseenter', mouseenter)
.on('mouseleave', debouncedMouseleave())
- .one('show.bs.popover', () => {
- window.addEventListener('scroll', hideOnScroll);
+ .on('show.bs.popover', () => {
+ window.addEventListener('scroll', hideOnScroll, { once: true });
});
}
}