From 799616deee806f3d9c49f294dc99eac636ec316a Mon Sep 17 00:00:00 2001 From: Brandon Casey <2381475+brandonocasey@users.noreply.github.com> Date: Fri, 11 Dec 2020 15:57:51 -0500 Subject: [PATCH] fix: play progress time tooltip from jittering during live (#6968) --- src/js/control-bar/progress-control/time-tooltip.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/control-bar/progress-control/time-tooltip.js b/src/js/control-bar/progress-control/time-tooltip.js index 0ba497ebb..ede9bb4d7 100644 --- a/src/js/control-bar/progress-control/time-tooltip.js +++ b/src/js/control-bar/progress-control/time-tooltip.js @@ -96,6 +96,12 @@ class TimeTooltip extends Component { pullTooltipBy = tooltipRect.width; } + // prevent small width fluctuations within 0.4px from + // changing the value below. + // This really helps for live to prevent the play + // progress time tooltip from jittering + pullTooltipBy = Math.round(pullTooltipBy); + this.el_.style.right = `-${pullTooltipBy}px`; this.write(content); }