From cf2de54d10ed2e71850f747d4c5308c5d1b2501d Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Sat, 19 Jul 2014 19:54:51 +0100 Subject: [PATCH] Don't need to give the menus IDs anymore. --- resources/report/js/custom.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/resources/report/js/custom.js b/resources/report/js/custom.js index 7c713ffe..5ad74551 100644 --- a/resources/report/js/custom.js +++ b/resources/report/js/custom.js @@ -223,10 +223,6 @@ var pluginCardProto = Object.create(HTMLElement.prototype, { menu.setAttribute('data-for', card.id); - /* To prevent the click event closing this menu just after it was - opened, attach an ID to it, then stop the current event and send - off a new one. */ - menu.id = Math.random().toString(36).substr(2) + Math.random().toString(36).substr(2); var main = document.getElementById('main'); main.appendChild(menu); @@ -250,6 +246,8 @@ var pluginCardProto = Object.create(HTMLElement.prototype, { evt.stopPropagation(); + /* To prevent the click event closing this menu just after it was + opened, stop the current event and send off a new one. */ menu.dispatchEvent(new CustomEvent('click', { newMenu: true })); } },