From 1c55e89586e1eb6be620af86061d981349643a28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Fri, 18 Aug 2023 14:27:05 +0200 Subject: [PATCH] fix(UI): Disable right click on range elements (#5497) Fixes https://github.com/shaka-project/shaka-player/issues/5450 --- ui/range_element.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/range_element.js b/ui/range_element.js index 309a07b2c6..dd930e421e 100644 --- a/ui/range_element.js +++ b/ui/range_element.js @@ -110,6 +110,11 @@ shaka.ui.RangeElement = class extends shaka.ui.Element { this.onChangeEnd(); } }); + + this.eventManager.listen(this.bar, 'contextmenu', (e) => { + e.preventDefault(); + e.stopPropagation(); + }); } /** @override */