While testing the civicspace theme in the Opera browser (Windows XP), I have noticed that the pngfix.js script is attempting to replace pngs with their Microsoft Internet Explorer equivalents. This is not necessary, as Opera supports alpha-transparent pngs. On some occasions, I have also noticed that the png images in Opera disappear completely, making underlying elements invisible.

This patch should correct this problem, as Opera's navigator.userAgent string always contains the string "Opera" and the opera version number, even when its masquerading as other browsers such as MSIE. I've inserted a check for the non-existance of this string before executing the png replacement.

Please check the format of the patch carefully, as its the first one I've submitted here ;)

Comments

robin monks’s picture

I did some various tests on Opera 8 with Windows XP without problems. Could you provide some screenshots/testcases/links to show this?

Thanks.

traemccombs’s picture

Sent email to Alan asking for update on status of this bug.
Trae

alan evans’s picture

StatusFileSize
new183.45 KB

I am attaching 3 screenshots of the same page (admin/themes) in Firefox, Internet Explorer, and Opera. Note the missing screenshot thumbnails in Opera.

Note that Opera will only show this behaviour when masquerading as MSIE (Using Opera version 8.5 for Windows XP, this is set in the tools menu under preferences, on the advanced tab under "network"). This appears to be the default setting for Windows installations of the free version, as I have made no changes to the settings in Opera.

alan evans’s picture

StatusFileSize
new150.03 KB

Internet Explorer screenshot ...

alan evans’s picture

StatusFileSize
new115.9 KB

And finally the Opera screenshot ...

traemccombs’s picture

I have asked Robin to re-check this issue. I'm thinking this would be after he applied your patch to CVS, I'm not entirely sure though Alan.

Trae

traemccombs’s picture

Status: Needs review » Fixed

Alan,

I have applied the patch, please tell me if this fixes the bug so I can close this ticket.

Trae

traemccombs’s picture

Assigned: alan evans » traemccombs
traemccombs’s picture

Status: Fixed » Closed (fixed)
alan evans’s picture

Seems to have done the trick, thanks.