Skip to content

Commit

Permalink
Only show context menu on highlighted element
Browse files Browse the repository at this point in the history
  • Loading branch information
olibu committed Apr 20, 2024
1 parent b4ac6bd commit fbd2b26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion context.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function bindContextMenu(node) {
const valueEnabled = type != 'SET' && type != 'SEQUENCE';
node.onclick = function (event) {
// do not show the menu in case of clicking the icon
if (event.srcElement.nodeName !== 'SUMMARY') {
if (event.srcElement.nodeName === 'SPAN') {
contextMenu.style.left = event.pageX + 'px';
contextMenu.style.top = event.pageY + 'px';
contextMenu.style.visibility = 'visible';
Expand Down

0 comments on commit fbd2b26

Please sign in to comment.