select2和bootstrap模态框一起使用导致select2的input获取不到焦点问题


解决办法:

把页面中的 tabindex="-1" 删掉, 或者值改为1

 

代码片段:

<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Panel</h3>
</div>

 

相关文章:

  • 2021-05-19
  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-11-21
  • 2021-06-30
  • 2021-09-22
猜你喜欢
  • 2021-10-31
  • 2021-10-22
  • 2021-11-29
  • 2022-01-07
  • 2022-12-23
  • 2021-07-19
  • 2022-12-23
相关资源
相似解决方案