Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Bootstrap 2.3、Bootboxを使用し、Ubuntu の Google Chrome で結果を表示すると、ボタンが自動フォーカスされるため、ボタンの周りに魅力的ではない境界線が表示されます。モーダルが表示されたら、ぼかしイベントをトリガーする API フックが見つかりませんでした。JavaScript のみ、または css だけでオートフォーカスを削除する方法はありますが、プロジェクトをフォークしてオートフォーカスを削除し、構成可能にするオプションはありませんか?
2.3
There is no API hook, but you can do it by attaching a javascript event handler to the alert:
var bbAlert = bootbox.alert('Alert!') bbAlert.on('shown.bs.modal', function(){ $('.btn-primary').blur(); });