css - Issue with HTML select size property -


we've cross browser issues html select when used size property. issue reproducible on fiddle. in firefox click on select , without selecting option click on body area, select open without applying size 1 property. when set size 2 on blur function it's working fine. how fix issue size 1?

enter image description here

#wgtmsr{   width:200px;    }    #wgtmsr option{   width:100%;   }
<div>  <label for="groups"style="font-size: small">comparison group:</label>  <select  name="wgtmsr" id="wgtmsr" onblur='this.size=1;' onchange='this.size=1; this.blur();' onmouseover='this.size=5;' onmouseout='this.size=1;'>  <option value="kg">kg</option>  <option value="gm">gm</option>  <option value="pound">pound</option>  <option value="metricton">metric ton</option>  <option value="litre">litre</option>  <option value="ounce">ounce</option>  <option value="jamil">jamil</option>  <option value="ahmad">ahmad</option>  </select>  </div>


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -