hover events are blocked when select2 dropdown is open

陌路散爱 提交于 2020-02-07 05:50:25

问题


When a Select2 dropdown is open, the JavaScript hover event and the css pseudoclass do not work anymore. E.g.

p:hover {
  color: red
}

only has effect when the dropdown is closed and not when it's opened.

See here for self contained example: http://jsfiddle.net/cre5hckw/6/

This may be related to https://github.com/ivaynberg/select2/issues/1715.

I'm looking forward to any feedback!


回答1:


Select2 uses a class, not :hover pseudoclass.

.select2-results .select2-highlighted {
    color: red;
}


来源:https://stackoverflow.com/questions/27344338/hover-events-are-blocked-when-select2-dropdown-is-open

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