If you are reading this, please get modern browser.
skip to main content | skip to main navigation | skip to secondary content

A Few Wishes For Next Safari Build

~ 20th June 2005. · 18:47 CET · permanent link · printer friendly ~

Many Mac users prefer Safari to less attractive, but more standards compliant Gecko-browsers. When we talk about CSS and DOM support, Safari is overall nice browser. There are, however, a few more or less annoying bugs. If somebody from Apple listens, it would be really great if you could fix some of those. Until they do something about it, here’s a quick overview with a workaround where applicable.

Click on a label doesn’t trigger radios and checkboxes

This is more of an accessibility/usability issue and can be solved with a simple JavaScript snippet (an example):

function fix_labels() {
    var lbls = document.getElementsByTagName('label');
    for (var i = 0; i < lbls.length; i++) {
        var lbl = lbls[i];
        lbl.onclick = check_it;
        lbl.onkeypress = check_it;
    }
}
function check_it() {
    var ipt = document.getElementById(this.htmlFor);
    if (!ipt) return;
    ipt.checked = (ipt.type == 'checkbox') ? (ipt.checked) ? false : true : (ipt.type == 'radio') ? true : false;
}
onload = fix_labels;

Min-height

This often needed functionality can be partially solved by defining height of an element in ems. However, that will break if text falls into few rows due to text resizing. Dave of Mezzoblue affix explained workaround, but the bug is still pain in the a**.

Hexadecimal color defined in CSS doesn’t match it’s PNG equivalent

Felt really stupid seeing my web site in Safari for the first time. Header graphic didn’t match background color. The solution is either avoiding a combination of PNG and background-color property or using GIFs only. The same bug is present in Internet Explorer, but that’s another story…

So, what are your most frequent Safari bugs?

2 Comments

  1. I have learned to be very diligent about specifying widths on my floated elements. This isn’t so much an issue with Safari as it is a poor implementation of the spec with regard to all other browsers.

    Lesson learned: If you use floats, make sure to check how they look in Safari because you may be suprised to see a floated element appearing further down the page (because it doesn’t have a width, and is given a default 100% width which causes a “clear") than you expect.

  2. The latest updates on Safari (1.3 v312 and 2.0 v412) introduced a lot of nice css fixes, but also a few problems. What was a rather well documented/tested way of putting a drop shodow on an image no longer works in either version. The right edges of the shadow is about 6 px too far to the right. The same technique, though, seems to work on text blocks.

    On 1.3 (but not 2.0) there’s also a strange set of problems with elastic images (image sizes specified in em’s). On the first image on the linked-to page, bumb the text size up and down and notice how the image tiles from the lower-left corner. The image is supposed to stretch and shrink with the text size.

Sorry, the comment form is closed at this time, but if you have anything to say, please send me a message.

* Please keep in mind that this is a personal web site and it does not reflect the position or opinion of my respective employers, organizations or partners.

Typetester – compare screen type Supported by Veer.

What is this?

A web log of Marko Dugonjić, web professional from Croatia. Topics covered:

Translate this site

German, Spanish, Italian, French or Japanese (via).

See you there!

Feel like buying a book?

Try with maratz.com aStore

Worth visiting

top of the page | skip to main content | skip to main navigation | skip to secondary content