AddinExpress.IE.ADXIEHTMLDocEvents changes browser behavior

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

AddinExpress.IE.ADXIEHTMLDocEvents changes browser behavior
Browser ignores onc lick="return false" if BHO is enabled 
Testy McTesterson




Posts: 4
Joined: 2011-07-05
I am having exactly the same problem as Ben Cowling in his post from last year:

http://www.add-in-express.com/forum/read.php?a&FID=10&TID=8266

Enabling a BHO which uses a AddinExpress.IE.ADXIEHTMLDocEvents object to handle events will cause Internet Explorer to ignore "return false" statements in anchor tags.

For example, the following 'return false' statement will not work in Internet Explorer with the BHO enabled:


<a href="foo.html" onc lick="return false;">This link should do nothing.</a>

(Note: This forum software is adding an extra space in "onclick" there.)

I have created a simple example showing the exact issue, with the minimum amount of code possible. Actually the code does nothing but get initialized.

The problem can be "enabled" and "disabled" simply by editing the code below:


public class IEModule : AddinExpress.IE.ADXIEModule
{
    // This eventBroker is used below...
    private AddinExpress.IE.ADXIEHTMLDocEvents eventBroker;
    ...
    private void InitializeComponent()
    {
        //
        // IEModule
        //
        this.ModuleName = "IEClickTest";
        this.components = new System.ComponentModel.Container();

        // The next line below causes the issue:
        this.eventBroker = new AddinExpress.IE.ADXIEHTMLDocEvents(this.components);
    }
    ...
}


The full C# VS2010 project can be found here: http://0x31337.org/IEClickTest.zip

A perfect example of how onclick handlers in links should work can be found here:
http://cs110.wellesley.edu/examples/return.html

Your help with this would be greatly appreciated - we are about to launch an app and I would really like to fix this bug before we have thousands of downloads. :o

P.S. - I have to commend the dev team on this Add-In Express. You have made a really great product and I am sure that this saves countless hours of developer time everyday.

Edit: - I updated the description of the problem with some example HTML which breaks when the BHO is enabled, and added a link to a VS2010 project which demonstrates the problem.
Posted 05 Jul, 2011 21:15:15 Top
Testy McTesterson




Posts: 4
Joined: 2011-07-05
I just noticed the "Escalate" buttons below...

Since I have done plenty of searching online for this problem, and there is another thread on this forum dealing with the exact same issue - I am going to escalate this to the core developers.

I hope that this is something I am doing wrong - not something going on in ADX itself.
Posted 05 Jul, 2011 21:45:54 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Testy,

You need to set the e.ReturnDefaultValue property of the corresponding event to true if you want to return the default value.
Posted 06 Jul, 2011 04:59:50 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Testy, what version of the product do you use?
I can't reproduce the issue in Add-in Express for IE v7.1.4102.
Posted 06 Jul, 2011 05:30:32 Top
J Drago




Posts: 4
Joined: 2011-07-05
You need to set the e.ReturnDefaultValue property of the corresponding event to true if you want to return the default value.


I have searched this forum but I see no reference to that. Can you please show me an example?

Testy, what version of the product do you use?
I can't reproduce the issue in Add-in Express for IE v7.1.4102.


The adxloader.dll shows version 6.2.3049.0 - is there any hope for me or do I have to upgrade?

I tried doing this but I still get the same thing - onc lick="return false" is ignored in hyperlinks:


private AddinExpress.IE.ADXIEHTMLDocEvents eventBroker;

public IEModule()
{
    InitializeComponent();
    eventBroker.OnClick += new AddinExpress.IE.ADXIEHTMLEventObjectEx_EventHandler( eventBroker_OnClick );
}

void eventBroker_OnClick(object sender, object eventObject, AddinExpress.IE.ADXCancelEventArgs args )
{
    args.Cancel = true;
}
Posted 06 Jul, 2011 13:02:49 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi j,

Add-in Express v6.2.3049 doesn't provide such a possibility. You need to install v6.4.379 or just updgrade to the new major version v7.1.4102.
Posted 07 Jul, 2011 05:27:04 Top
J Drago




Posts: 4
Joined: 2011-07-05
Hi,

We upgraded and applied the fix you suggested.

It works!

Thank you so much for your help. :)
Posted 13 Jul, 2011 20:05:51 Top