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:
@@ -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()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user