aboutsummaryrefslogtreecommitdiff
path: root/js/src
diff options
context:
space:
mode:
authorGeoSot <[email protected]>2022-07-14 12:06:06 +0300
committerGitHub <[email protected]>2022-07-14 10:06:06 +0100
commit713d7140f18514c916f75be34e809ebe00c1691c (patch)
tree4b381784545f22a61f9c88ef15b52d32b515e029 /js/src
parent8bb68b04b35765c30038923bd620ee28b21553c8 (diff)
downloadbootstrap-713d7140f18514c916f75be34e809ebe00c1691c.tar.xz
bootstrap-713d7140f18514c916f75be34e809ebe00c1691c.zip
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 <[email protected]> Co-authored-by: Julien Déramond <[email protected]> Co-authored-by: Patrick H. Lauke <[email protected]>
Diffstat (limited to 'js/src')
-rw-r--r--js/src/offcanvas.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/offcanvas.js b/js/src/offcanvas.js
index 34616eb37..30a9a4513 100644
--- a/js/src/offcanvas.js
+++ b/js/src/offcanvas.js
@@ -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()
}