Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Disable link text popup (Read 182 times)
Gagandeep Singh
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Dec 1st, 2022
Disable link text popup
Mar 1st, 2024 at 7:46pm
Print Post  
Hi there,

I want to disable adding link description when we double click on link. However, I am trying to do like this

Code (Javascript)
Select All
 diagram.addEventListener(Events.linkDoubleClicked, (sender, args) => {
        args.cancel = true;
    });
 



But this doesn't work
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Disable link text popup
Reply #1 - Mar 2nd, 2024 at 2:46pm
Print Post  
Hi,

You can cancel that from Events.linkTextEditing handler.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Gagandeep Singh
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Dec 1st, 2022
Re: Disable link text popup
Reply #2 - Mar 4th, 2024 at 3:19am
Print Post  
No it doesn't work either. Just don't want that textarea to show when we double click on link
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: Disable link text popup
Reply #3 - Mar 4th, 2024 at 8:09am
Print Post  
Make sure you are handling linkTextEditing event, and not linkTextEdited. This does not show text area in my test:

Code
Select All
diagram.addEventListener(Events.linkTextEditing, onLinkTextEditing);

function onLinkTextEditing(sender, args)
{
	console.log("onLinkTextEditing");
	args.cancel = true;
} 



If you are on old version that does not have the event, you can disable allowInplaceEdit altogether and call beginEdit method from nodeDoubleClicked handler.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint