Jump to content

unitree node disable the right-click menu of IE


风吹小机机

Recommended Posts

1 hour ago, 风吹小机机 said:

TUniTreeView

 

8 hours ago, 风吹小机机 said:

Tunitree, how can the node disable the right-click menu of IE

Can you try?

function afterrender(sender, eOpts)
{
    sender.getView().getEl().dom.addEventListener(
      'contextmenu', 
      function(e) {
        e.preventDefault()
      }
    );
}

 

Link to comment
Share on other sites

On 9/13/2021 at 7:15 PM, Sherzod said:

 

Can you try?

function afterrender(sender, eOpts)
{
    sender.getView().getEl().dom.addEventListener(
      'contextmenu', 
      function(e) {
        e.preventDefault()
      }
    );
}

 

Tunitreeview is browser right-click disabled

However, the internal node does not disable the right button, and two menus (customized menu and browser menu) will appear

Link to comment
Share on other sites

9 minutes ago, 风吹小机机 said:

Tunitreeview is browser right-click disabled

However, the internal node does not disable the right button, and two menus (customized menu and browser menu) will appear

Sorry, maybe I didn't describe the problem very clearly

As shown in the figure, how to remove the menu in the red box

Only disable the browser's own menu of tree nodes

aaaa.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...