mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Don't need to give the menus IDs anymore.
This commit is contained in:
@@ -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 }));
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user