mirror of
https://github.com/Hopiu/bootstrap.git
synced 2026-05-20 01:31:52 +00:00
add "focus" option for turning off modal focusing #16050
This commit is contained in:
parent
da495ee24c
commit
7ef0e52fd0
1 changed files with 2 additions and 1 deletions
|
|
@ -29,6 +29,7 @@ const Modal = (($) => {
|
||||||
const Default = {
|
const Default = {
|
||||||
backdrop : true,
|
backdrop : true,
|
||||||
keyboard : true,
|
keyboard : true,
|
||||||
|
focus : true,
|
||||||
show : true
|
show : true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -223,7 +224,7 @@ const Modal = (($) => {
|
||||||
})
|
})
|
||||||
|
|
||||||
let transitionComplete = () => {
|
let transitionComplete = () => {
|
||||||
this._element.focus()
|
if (this._config.focus) this._element.focus()
|
||||||
$(this._element).trigger(shownEvent)
|
$(this._element).trigger(shownEvent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue