From a1763dcc561b13b957dae212b65530e6070a7c54 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Thu, 18 May 2017 13:12:18 -0400 Subject: [PATCH] fix: Only update text track mode if changed (#4368) --- .../control-bar/text-track-controls/text-track-menu-item.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/control-bar/text-track-controls/text-track-menu-item.js b/src/js/control-bar/text-track-controls/text-track-menu-item.js index 11898de223..8d68e381f6 100644 --- a/src/js/control-bar/text-track-controls/text-track-menu-item.js +++ b/src/js/control-bar/text-track-controls/text-track-menu-item.js @@ -103,8 +103,10 @@ class TextTrackMenuItem extends MenuItem { } if (track === this.track) { - track.mode = 'showing'; - } else { + if (track.mode !== 'showing') { + track.mode = 'showing'; + } + } else if (track.mode !== 'disabled') { track.mode = 'disabled'; } }