From e0436524cbdbc310f508d3e2eea2ed7f7e6e52e4 Mon Sep 17 00:00:00 2001 From: Adrien Di Paolo Date: Tue, 28 May 2024 16:50:12 +0200 Subject: [PATCH] fix: removeEventListener Mouseover --- BlazorContextMenu/wwwroot/blazorContextMenu.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BlazorContextMenu/wwwroot/blazorContextMenu.js b/BlazorContextMenu/wwwroot/blazorContextMenu.js index d77b82f..7115d00 100644 --- a/BlazorContextMenu/wwwroot/blazorContextMenu.js +++ b/BlazorContextMenu/wwwroot/blazorContextMenu.js @@ -275,7 +275,7 @@ var blazorContextMenu = function (blazorContextMenu) { blazorContextMenu.Hide(subMenu.id); } - i = currentMenuList.childNodes.length; + i = currentMenuList.children.length; while (i--) { var child = currentMenuList.children[i]; if (child == currentItemElement) continue; @@ -283,9 +283,9 @@ var blazorContextMenu = function (blazorContextMenu) { } }; - var i = currentMenuList.childNodes.length; + var i = currentMenuList.children.length; while (i--) { - var child = currentMenuList.childNodes[i]; + var child = currentMenuList.children[i]; if (child == currentItemElement) continue; child.addEventListener("mouseover", closeSubMenus);