Skip to content

Commit fe33775

Browse files
Context Menu handlers are added only once to each tab
1 parent 204f162 commit fe33775

File tree

1 file changed

+2
-1
lines changed
  • CS/DxBlazorApplication1/wwwroot/js

1 file changed

+2
-1
lines changed

CS/DxBlazorApplication1/wwwroot/js/mdi.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
function addContextMenuHandler(container, tabClass, text, dotNetObject) {
22
var tabElement = container.getElementsByClassName(tabClass)[0];
3-
if (!tabElement) return;
3+
if (!tabElement || tabElement.hasAttribute("cp_ctx")) return;
4+
tabElement.setAttribute("cp_ctx", true);
45
tabElement.addEventListener('contextmenu', (event) => {
56
event.preventDefault();
67
let eventArgs = {

0 commit comments

Comments
 (0)