Skip to content

Commit

Permalink
fix for Safari's false positive on datalist.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Dec 12, 2011
1 parent 18702be commit cb98fb9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modernizr.js
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,11 @@ window.Modernizr = (function( window, document, undefined ) {
for ( var i = 0, len = props.length; i < len; i++ ) {
attrs[ props[i] ] = !!(props[i] in inputElem);
}
if (attrs.list){
// safari false positive's on datalist: webk.it/74252
// see also github.com/Modernizr/Modernizr/issues/146
attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement);
}
return attrs;
})('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' '));

Expand Down

0 comments on commit cb98fb9

Please sign in to comment.