Community
Participate
Working Groups
RedHat 8.0, Mozilla 1.0.1, Eclipse 2.1 RC3 build. Performing search from the workbench, and double clicking result opens help, shows search results in search view, highlight selected topic in the list and display the topic on the right. An example of URL displayed in the address is: http://127.0.0.1:33524/help/index.jsp?tab=search&searchWord=%6a%61%76%61&maxHits=500&lang=en_US&fieldSearch=false&topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fhelp_infocenter.html%3Fresultof%3D%2522%256a%2561%2576%2561%2522%2520 Doing the same when browser (mozilla) is already opened results in results being shown, but the selected topic is not highlighted in the list. It is not shown in the content area either (welcome page is displayed). The URL for the same hit is displayed by Mozilla as: http://127.0.0.1:33524/help/index.jsp?tab=search&searchWord=java&maxHits=500&lang=en_US&fieldSearch=false&topic=/org.eclipse.platform.doc.isv/reference/misc/help_infocenter.html?resultof=%22%6a%61%76%61%22%20 which is different then the URL before. The encoded parameters are somewhat corrupted.
Sorry Wassim, I think this bug was reported by me, but bugzilla does not let me change the reported. The problem affects Mozilla, but not Netscape 4. It was introduced in M5 build, with the code for bug 23750 that is intended to go around Mozilla bug that does not restore Mozilla from minimized. We should see whether the workaround can be fixed, or consider backing it out as I think this bug is more important than 23750 one.
This problem will be more pronounced with search for DBCS words. The search word is encoded in the URL and that would be corrupted. Rather than completely removing the workaround for bug 23750 to fix this problem with Mozilla it is possible to restored the code to open a browser to its original state (pre M5) and place the window.focus() javascript call in our index.jsp. It has the same effect on Mozilla - it restores it from minimized, without affecting how the browser opens. The 2 patches to apply to RC3a are: Index: MozillaBrowserAdapter.java =================================================================== RCS file: /home/eclipse/org.eclipse.help/src/org/eclipse/help/internal/browser/Mozil laBrowserAdapter.java,v retrieving revision 1.5 diff -u -r1.5 MozillaBrowserAdapter.java --- MozillaBrowserAdapter.java 11 Mar 2003 20:38:34 -0000 1.5 +++ MozillaBrowserAdapter.java 21 Mar 2003 18:48:04 -0000 @@ -210,12 +210,7 @@ waitForBrowser(); if (exitRequested) return; - //workaround for bug 23750, mozilla bug 159092 - // instead of simply -remote openURL(" + url + ")", call a javascript - if (openBrowser(executable - + " -remote openURL(javascript:window.focus ();window.location=\'" - + url - + "\')") + if (openBrowser(executable + " -remote openURL(" + url + ")") == 0) { return; } Index: index.jsp =================================================================== RCS file: /home/eclipse/org.eclipse.help.webapp/advanced/index.jsp,v retrieving revision 1.14 diff -u -r1.14 index.jsp --- index.jsp 11 Mar 2003 22:05:33 -0000 1.14 +++ index.jsp 21 Mar 2003 18:48:36 -0000 @@ -37,6 +37,14 @@ function onloadHandler(e) { +<% +if (data.isMozilla()){ +// restore mozilla from minimized +%> + window.focus(); +<% +} +%> window.frames["SearchFrame"].document.getElementById("searchWord").focus (); } The patch is very safe, as it does not affect Windows in any way, it will restore Netscape launching code to the original state, and the line of code added to index.jsp will only run on Mozilla (that has the problem). Please review and approve for releasing into RC4.
I did a code review and tests with the proposed fixed and find it safe for releasing into RC4. It is an important fix to have for the Linux platform and recommend having it fixed in RC4.
Approved for fixing for RC4.
Since the patch may look a bit unreadable, what the fix is doing is: replacing the command: mozilla -remote openURL(javascript:window.focus();window.location=help_url) by mozilla -remote openURL(help_url) and moving the window.focus() inside the url that we open (i.e. inside the index.jsp file).
+1
Fixed.
Verified using I20030326 build.