Community
Participate
Working Groups
After doing a search, the highlighted terms in the pages found are white - same colour as the background and so are invisible.
What is your browser and its version? Do you know if highlighting works at all, i.e. the words are highlighted in white, or they are not highlighted.? Can you attach a screen shot? Thanks.
Created attachment 6924 [details] Example of bad highlighting
So sorry - I should have been more specific. This is happening in Safari, version 1.1.1 on OS X 10.3.1. The words are highlighted (they exist) its just that their colour is white.
Help uses following Javascript code (in plugins/org.eclipse.help.webapp/advanced/highlight.js) to highlight words: spanNode.style.background="Highlight"; spanNode.style.color="HighlightText"; Either: 1. The first line had no effect, or 2. HighlightText and Higlight are the same colors in Safari (or color scheme was customized such that these two colors are the same). I do not have access to a Mac machine to test it. If you could interchange the colors - replace the lines with spanNode.style.background="HighlightText"; spanNode.style.color="Highlight"; and see what highlighting you get, that would tell us if one the lines does nothing or the colors are the same. One more question: What colors are used when you search for a string in a document (using "find on this page" or similar action in Safari). Is this how you got white on gray for the first highlighted word in the screen shot? Thanks.
Swapping the two lines had no effect at all. (I got the grey highlight by selecting the text to show that the text was actually there as an example.) However, if I set the colours as follows: spanNode.style.background="red"; spanNode.style.color="green"; I get red background, green foreground. I guess there is a problem with the 'Highlight' and 'Highlighttext' keywords?
http://www.w3.org/TR/REC-CSS2/ui.html#system-colors describes CSS2 values for system colors. Help uses colors from this set. It is expected that browser/OS ensure there is enough contrast between Highlight and HighlightText colors. It looks like Safari substitutes white for both colors. Do you know how to report this problem to Safari developers? As a workaround we could hardcode different values instead of using system colors for highlighting if browser is Safari. What would be the colors (hex values)for highlight text and background exepected (what user gets when selecting regular black on white text) on Mac?
> Do you know how to report this problem to Safari developers? Yes I can certainly submit a bug reporter but I don't know how long it will take for them to pick it up. > What would be the colors (hex values)for highlight text and background exepected (what user gets when selecting regular black on white text) on Mac? I believe the foreground is black, and the background is B5D5FF
I should add that this is only happening in Safari - Firebird and Camino highlight correctly with the foreground and background colours I have given. IE gets the right background colour but the foreground is a dark green (no idea where that came from but its readable).
Added workaround to set foreground to #000000, and background to #B5D5FF for highlighted terms instead of using system colors on Safari. If the report against Safari can be tracked externally, please add a link here, so we can watch it and remove the workaround in the future or limit workaround to specific Safari versions. Thanks.
Please verify the fix in the build >20031124.
Unfortunately, Safari does not have a public bug tracker but I'll check future releases for compatibility.
Still broken in Safari 1.1.1 :-(
Was there any change in the behavior, after a fix got released? The code for highlighting with a special case for Safari is in the file plugins/org.eclipse.help.webapp_3.0.0/advanced/highlight.js. If you could, play with the file, to find out what is wrong, just remember to refresh the highlighted document in the browser every time you make a chanage, to see it. Thanks.
The fix works OK in Safari 1.1.1, I was just testing Safari's support for Highlight and HighlightText in the hope that the default highlighting could be used. BTW, I have found that in Safari, you need to empty its cache to make it load new CSS (Safari menu / Empty Cache). Channing
OK. I misunderstood. Marking the bug again as fixed.
Update for Safari 1.2 Unfortunately, Safari 1.2 does not fix this problem but the workaround described in Comment 9 still works correctly. Channing