X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FHtml.php;h=14456e4beeeedda2653a73b889021a28082b716d;hb=72a418077672b7fce4763f47b61c31931dcab87c;hp=2ab606912a9ba4ee41acca7656f5c31e33444416;hpb=0a32a34775b8f8042868a14903d3c217cf2c46bc;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Html.php b/includes/Html.php index 2ab606912a..14456e4bee 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -476,7 +476,13 @@ class Html { // server-side validation. Opera is the only other implementation at // this time, and has ugly UI, so just kill the feature entirely until // we have at least one good implementation. - if ( in_array( $key, array( 'max', 'min', 'pattern', 'required', 'step' ) ) ) { + + // As the default value of "1" for "step" rejects decimal + // numbers to be entered in 'type="number"' fields, allow + // the special case 'step="any"'. + + if ( in_array( $key, array( 'max', 'min', 'pattern', 'required' ) ) || + $key === 'step' && $value !== 'any' ) { continue; }