Bug 237613

Summary: HTML Browser Component Title Listener is calling twice - SWT
Product: [Eclipse Project] Platform Reporter: Ramesh Narayanamoorthy <ramesh.narayanamoorthy>
Component: SWTAssignee: Grant Gayed <grant_gayed>
Status: RESOLVED WORKSFORME QA Contact:
Severity: major    
Priority: P3 CC: ramesh.narayanamoorthy
Version: 3.3Keywords: needinfo
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Ramesh Narayanamoorthy CLA 2008-06-18 07:43:56 EDT
Build ID: M20080221-1800

Steps To Reproduce:
1. I have loaded HTML file in SWT application using browser composite. 
2. I have added title listener in my Java code.
3. I am updating the title whenever user click the HTML page.
4. In Java code title listener getting fired twice. Suppose if I run the same code in eclipse 3.1 version it is working fine. 



More information:
This issues is replicating in Eclipse 3.3 version only. If I run the same code in 3.1 version this issue is not happeneing.

Please let me know this is really bug in eclipse 3.3 version.
Comment 1 Grant Gayed CLA 2008-06-18 10:54:12 EDT
Please try this with a recent 3.4 build like http://download.eclipse.org/eclipse/downloads/drops/S-3.4RC4-200806091311/index.php , and if you still see this problem then can you provide a snippet that reproduces it?  An ideal snippet template to start with would be http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet148.java?view=co .
Comment 2 Ramesh Narayanamoorthy CLA 2008-06-19 09:28:32 EDT
(In reply to comment #0)
> Build ID: M20080221-1800
> Steps To Reproduce:
> 1. I have loaded HTML file in SWT application using browser composite. 
> 2. I have added title listener in my Java code.
> 3. I am updating the title whenever user click the HTML page.
> 4. In Java code title listener getting fired twice. Suppose if I run the same
> code in eclipse 3.1 version it is working fine. 
> More information:
> This issues is replicating in Eclipse 3.3 version only. If I run the same code
> in 3.1 version this issue is not happeneing.
> Please let me know this is really bug in eclipse 3.3 version.

We build the application using Java SWT.
1. We have created some HTML files and loaded that HTML files in our SWT application using HTML browser.
2. Whenever user clicks the html file we are updating the html file title with some id.
3. In Java code we have added title listener for that browser composite. Suppose if title get changed this title listener will get fired.
4. This application was developed in Eclipse SDK 3.1 version. Now we have migrated into Eclipse SDK 3.3 version.
5. In Eclipse SDK 3.3 version we are getting issues in title listener. Whenever we are updating the html title that browser composite title listener getting fired twice.
6. The same thing we tried with Eclipse SDK 3.3.0 and Eclipse SDK 3.3.3 and Eclipse SDK 3.4 versions but the same issues is continuing.

Comment 3 Ramesh Narayanamoorthy CLA 2008-06-19 09:31:40 EDT
(In reply to comment #1)
> Please try this with a recent 3.4 build like
> http://download.eclipse.org/eclipse/downloads/drops/S-3.4RC4-200806091311/index.php
> , and if you still see this problem then can you provide a snippet that
> reproduces it?  An ideal snippet template to start with would be
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet148.java?view=co
> .

As per your suggestion we have downloaded 3.4 build and test the application still the same issus is happening.
Comment 4 Ramesh Narayanamoorthy CLA 2008-06-19 09:58:48 EDT
(In reply to comment #1)
> Please try this with a recent 3.4 build like
> http://download.eclipse.org/eclipse/downloads/drops/S-3.4RC4-200806091311/index.php
> , and if you still see this problem then can you provide a snippet that
> reproduces it?  An ideal snippet template to start with would be
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet148.java?view=co
> .

As per your suggestion we have downloaded 3.4 build and test the application still the same issus is happening.
Comment 5 Grant Gayed CLA 2008-06-19 11:33:07 EDT
> 2. Whenever user clicks the html file we are updating the html file title with
> some id.

This is the ambiguous part.  By "clicks the html", do you mean you're listening for SWT.MouseDown on the Browser?  Or if javascript?  And what do you invoke to update the html file's title?  Again, it would be ideal if I could just run something and see the problem happen rather than trying to reconstruct it from a verbal description.
Comment 6 Grant Gayed CLA 2010-02-11 15:30:40 EST
Timed out, closing.  Please reopen if this still happens with recent swt releases and if there is more info to provide.