Open a color input with display:none via a label (webkit)

孤人 提交于 2019-12-04 13:54:35

I guess it is a bug, for chrome(not really sure about other browsers). you can have a workaround for this specific situation: http://jsfiddle.net/z1ta7ou0/4/

instead of using

input {
  display: none;
}

use

input {
   visibility :hidden;
    width:0px;
padding:0;
margin:0;
}

seems like there is only display:none which causes the problem(label not getting associated), otherwise works fine.

I have also opened an issue here, you can track it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!