1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-06 13:46:42 +02:00

Offcanvas: activate focustrap when backdrop is enabled (#36717)

* fix(offcanvas): activate focustrap when backdrop is enabled
* Adding tabindex='-1' for both offcanvases in the docs
* Remove useless aria-expanded='false' in togglers
* Update js/tests/unit/offcanvas.spec.js

Co-authored-by: Julien Déramond <julien.deramond@orange.com>
Co-authored-by: Julien Déramond <juderamond@gmail.com>
Co-authored-by: Patrick H. Lauke <redux@splintered.co.uk>
This commit is contained in:
GeoSot
2022-07-14 12:06:06 +03:00
committed by GitHub
parent 8bb68b04b3
commit 713d7140f1
4 changed files with 28 additions and 6 deletions

View File

@@ -114,7 +114,7 @@ class Offcanvas extends BaseComponent {
this._element.classList.add(CLASS_NAME_SHOWING)
const completeCallBack = () => {
if (!this._config.scroll) {
if (!this._config.scroll || this._config.backdrop) {
this._focustrap.activate()
}