Browsers

Spruce up your Drupal search box for Safari users

My favourite browser Safari has support for a snazzy custom input field type called "search". This gives the field a rounded look and the ability to remember search history (amongst other things). The major drawback is of course that the HTML will no longer validate since this feature isn't part of the official spec.

In order get around this problem I whipped up a jQuery snippet that dynamically changes the Drupal search input field to a Safari search field if the visitor uses Safari.