Bug 47298 - Search result highlighted words are white therefore invisible
Summary: Search result highlighted words are white therefore invisible
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Konrad Kolosowski CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-23 06:27 EST by Channing Walton CLA
Modified: 2004-02-04 09:05 EST (History)
0 users

See Also:


Attachments
Example of bad highlighting (25.95 KB, image/jpeg)
2003-11-24 02:45 EST, Channing Walton CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Channing Walton CLA 2003-11-23 06:27:15 EST
After doing a search, the highlighted terms in the pages found are white - same colour as the 
background and so are invisible.
Comment 1 Konrad Kolosowski CLA 2003-11-24 00:25:45 EST
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.
Comment 2 Channing Walton CLA 2003-11-24 02:45:02 EST
Created attachment 6924 [details]
Example of bad highlighting
Comment 3 Channing Walton CLA 2003-11-24 02:45:17 EST
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.
Comment 4 Konrad Kolosowski CLA 2003-11-24 11:14:10 EST
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.
Comment 5 Channing Walton CLA 2003-11-24 11:58:14 EST
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?
Comment 6 Konrad Kolosowski CLA 2003-11-24 12:41:08 EST
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?
Comment 7 Channing Walton CLA 2003-11-24 13:26:28 EST
> 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
Comment 8 Channing Walton CLA 2003-11-24 13:37:55 EST
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).
Comment 9 Konrad Kolosowski CLA 2003-11-24 14:45:50 EST
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.
Comment 10 Konrad Kolosowski CLA 2003-11-24 14:58:52 EST
Please verify the fix in the build >20031124.
Comment 11 Channing Walton CLA 2003-11-24 15:03:15 EST
Unfortunately, Safari does not have a public bug tracker but I'll check future releases for compatibility.
Comment 12 Channing Walton CLA 2003-12-24 13:57:24 EST
Still broken in Safari 1.1.1 :-(
Comment 13 Konrad Kolosowski CLA 2004-01-04 00:43:46 EST
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.
Comment 14 Channing Walton CLA 2004-01-04 05:25:47 EST
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
Comment 15 Konrad Kolosowski CLA 2004-01-04 12:26:06 EST
OK.  I misunderstood.  Marking the bug again as fixed.
Comment 16 Channing Walton CLA 2004-02-04 09:05:26 EST
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