Bug Tracker

Opened 15 years ago

Closed 15 years ago

#2770 closed bug (wontfix)

Can't change attr type to 'search' in Safari 3

Reported by: codyx Owned by:
Priority: major Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: attribute attr safari search Cc:
Blocked by: Blocking:


Taken from mailing list, posted by Claudio Procida:

Apparently, jQuery can't set the "type" attribute of html input fields to look like Cocoa search fields in Safari. jQuery version: 1.2.3 Safari version: 3.1 (525.13) Proof follows:

<script src="jquery-1.2.3.min.js"></script> 
$(function() { 
// this works: 
//document.getElementById('s_f').setAttribute('type', 'search'); 
// these don't work: 
$('#s_f').attr('type', 'search'); 
$('#s_f').attr({type: 'search'}); 

        <input type="text" id="s_f" /> 

Change History (1)

comment:1 Changed 15 years ago by scott.gonzal

Resolution: wontfix
Status: newclosed

jQuery doesn't support setting the type attribute. There are just too many problems and input elements are not meant to change type. The best you can do is remove the element and replace it with a new element of the desired type.

Note: See TracTickets for help on using tickets.