adxieContextMenuCommand gives parent element not the pointed one.

Add-in Express™ Support Service
That's what is more important than anything else

adxieContextMenuCommand gives parent element not the pointed one.
 
ravinukala




Posts: 103
Joined: 2012-10-05
Hi,

I am capturing object info on context menu command button click event like:

private void adxieContextMenuCommandItem1_OnClick(object sender, object htmlElement)
{
mshtml.IHTMLElement element = (mshtml.IHTMLElement)htmlElement;
}

Please go to google.co.in. When I point to any link like 'Hindi','Marathi' and hit the ContextMenuCommand it gives me div element and not link element.

I am using IE9 on Windows7

How can I get that link element.

Regards
Posted 24 Dec, 2012 01:19:26 Top
Andrei Smolin


Add-in Express team


Posts: 15199
Joined: 2006-05-11
Hello,

I've just reproduced this and passed a word to our developers. Thank you for reporting. As soon as I have any nes on this, I'll let you know. Thank you again.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 24 Dec, 2012 04:14:43 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Ravi,

Please try to use the OnClickEx event instead of OnClick.
Posted 24 Dec, 2012 05:27:38 Top
ravinukala




Posts: 103
Joined: 2012-10-05
Hi,

Did we get any concrete solution for the problem?

What is difference between OnClick and OnClickEx event?

Which is better to use?

Regards
Posted 10 Jan, 2013 04:15:19 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Ravi,

I can't reproduce the issue with the OnClickEx event. Does OnClickEx work for you?
The difference is that OnClick can't return the selection object and HTML element at the same time.
But OnClickEx does it via the 'e' parameter.
Posted 10 Jan, 2013 09:42:54 Top