0

I met a case when I use mshtml to detect the event when click on a htmlelement like a href, I use the code below:

DOMEventHandler onclickhandler = new DOMEventHandler(doc,null);

onclickhandler.NewEventHandlers += new DOMEvent(DOMEventMethods._click);

doc.onclick = onclickhandler;

void _click(IHTMLEventObj obj)
{
    MessageBox.Show(obj.srcElement.tagName);
}

But if the htmlelement has a JavaScript onclick={dosomething();return false;} then I cannot capture the event.

How do I fix the issue like this? Or is there any work around?

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
user498151
  • 151
  • 1
  • 5

1 Answers1

1

Finally, I choose use mouseup to monitor this kind of event, not a great solution, if you have any other great solution, please let me know, thanks

user498151
  • 151
  • 1
  • 5