From 49595ffa2fbf45f4d5d40e59a6a7e4f21ffa3939 Mon Sep 17 00:00:00 2001 From: Shamim Rezaie Date: Wed, 19 Oct 2022 13:57:27 +1100 Subject: [PATCH] MDL-75423 output: select_menu label bug fix - click on the label were not always focusing on the element --- lib/templates/select_menu.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/templates/select_menu.mustache b/lib/templates/select_menu.mustache index d4af2d6082c..07bb695e07d 100644 --- a/lib/templates/select_menu.mustache +++ b/lib/templates/select_menu.mustache @@ -127,7 +127,7 @@ var label = document.getElementById('{{baseid}}-label'); if (label) { label.addEventListener('click', function() { - label.parentElement.querySelector('.dropdown-toggle').focus(); + this.parentElement.querySelector('.dropdown-toggle').focus(); }); } {{/js}}