解决bootstrap typeahead 自动完成组件鼠标不点击提示框不消失的bug

   如题,在
<script>
$(document).ready(function($) {
   // Workaround for bug in mouse item selection
   $.fn.typeahead.Constructor.prototype.blur = function() {
      var that = this;
      setTimeout(function () { that.hide() }, 250);
   };
 
   $('#product_search').typeahead({
      source: function(query, process) {
         return ["Deluxe Bicycle", "Super Deluxe Trampoline", "Super Duper Scooter"];
      }
   });
})
</script>

参考:

https://www.cnblogs.com/haogj/p/3376874.html

posted @ 2018-07-26 17:54  八方鱼  阅读(501)  评论(0)    收藏  举报