Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 107438 - SWT Browser: LocationListener.changing() not triggered by some IE versions
Summary: SWT Browser: LocationListener.changing() not triggered by some IE versions
Status: RESOLVED DUPLICATE of bug 141678
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-19 10:01 EDT by Florian Thienel CLA
Modified: 2006-06-07 17:27 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Thienel CLA 2005-08-19 10:01:33 EDT
The changing() event of LocationListener is not triggered by some versions of
the IE. I found out that there are two different ActiveX events BeforeNavigate
and BeforeNavigate2 and some versions of the IE trigger the first one, other
versions trigger the second one.

The Browser widget listens only for BeforeNavigate2 so the BeforeNavigate events
get lost.

I tested this with the following versions of IE:

don' work:
6.0.2900.2180.xpsp_sp2_gdr.050301-1519
6.0.2800.1106.xpsp1.020828-1920

works:
6.0.2800.1106.xpsp2.040919-1003 

A solution to this problem would be to listen for both events.
Comment 1 Grant Gayed CLA 2005-09-29 12:54:10 EDT
Strange, I've found two XP machines here with IE version 
6.0.2900.2180.xpsp_sp2_gdr.050301-1519, and the BeforeNavigate2 events are 
received fine on both of them.  It seems like the condition for this difference 
is something other than the IE version.  Maybe your machines have some ActiveX 
control that is being problematic (?).

I'm quite hesitant to start treating BeforeNavigate interchangeably with 
BeforeNavigate2, as BeforeNavigate was deprecated quite a long time ago (IE 
4.0), so there has been a long opportunity for divergence in their 
implementations.

I'll keep an eye open for reports of this behaviour in other embedded IE 
contexts.
Comment 2 Grant Gayed CLA 2006-06-06 14:06:31 EDT
possibly related: bug 141678
Comment 3 Florian Thienel CLA 2006-06-07 03:09:40 EDT
I found the following out: 

The problem seems to be that the IE implements two different interfaces IWebBrowser and IWebBrowser2 that have different events with different event IDs. It depends on the registry entry "HKEY_CLASSES_ROOT\Shell.Explorer\CLSID" which of the two interfaces is used when you instanciate the IE using the ProgID "Shell.Explorer". If you want to instanciate a IE that uses a specific interface you have to use "Shell.Explorer.1" or "Shell.Explorer.2" as ProgID instead. 

That's the good news.

In reality any combinations of the two interfaces can be installed: only IWebBrowser2, only IWebBrowser or both. It depends on whatever M$ products you installed in the life of your machine. 

So the best solution would be to listen to the events of both interfaces.
Comment 4 Dani Megert CLA 2006-06-07 04:52:30 EDT
This is a major problem since it means no Javadoc hovers in the Java editor.
Comment 5 Olaf Kaus CLA 2006-06-07 10:20:13 EDT
*** Bug 141678 has been marked as a duplicate of this bug. ***
Comment 6 Olaf Kaus CLA 2006-06-07 10:23:35 EDT
Workaround: 
Change the Reg.Entry: HKEY_CLASSES_ROOT\Shell.Explorer\CLSID
from: {EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B}
to: {8856F961-340A-11D0-A96B-00C04FD705A2}
Comment 7 Grant Gayed CLA 2006-06-07 17:27:39 EDT
Florian, thanks for looking into this!  A fix for this has been put into the 3.3 stream, and a patch will be added to bug 141678 for consideration for 3.2.1.  Marking this report as a duplicate of bug 141678 since that report is more serious and therefore has a better chance for inclusion in 3.2.1.


*** This bug has been marked as a duplicate of 141678 ***