mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-01 13:24:25 +01:00
fixes #5336: reorder focus() call to avoid scrolling
This commit is contained in:
parent
fa778792c5
commit
e24b46b7f3
5
docs/assets/js/bootstrap-modal.js
vendored
5
docs/assets/js/bootstrap-modal.js
vendored
@ -70,13 +70,12 @@
|
|||||||
that.$element
|
that.$element
|
||||||
.addClass('in')
|
.addClass('in')
|
||||||
.attr('aria-hidden', false)
|
.attr('aria-hidden', false)
|
||||||
.focus()
|
|
||||||
|
|
||||||
that.enforceFocus()
|
that.enforceFocus()
|
||||||
|
|
||||||
transition ?
|
transition ?
|
||||||
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
||||||
that.$element.trigger('shown')
|
that.$element.focus().trigger('shown')
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
8
docs/assets/js/bootstrap.js
vendored
8
docs/assets/js/bootstrap.js
vendored
@ -794,13 +794,12 @@
|
|||||||
that.$element
|
that.$element
|
||||||
.addClass('in')
|
.addClass('in')
|
||||||
.attr('aria-hidden', false)
|
.attr('aria-hidden', false)
|
||||||
.focus()
|
|
||||||
|
|
||||||
that.enforceFocus()
|
that.enforceFocus()
|
||||||
|
|
||||||
transition ?
|
transition ?
|
||||||
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
||||||
that.$element.trigger('shown')
|
that.$element.focus().trigger('shown')
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -956,7 +955,8 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
}(window.jQuery);/* ===========================================================
|
}(window.jQuery);
|
||||||
|
/* ===========================================================
|
||||||
* bootstrap-tooltip.js v2.1.2
|
* bootstrap-tooltip.js v2.1.2
|
||||||
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
||||||
* Inspired by the original jQuery.tipsy by Jason Frame
|
* Inspired by the original jQuery.tipsy by Jason Frame
|
||||||
|
8
docs/assets/js/bootstrap.min.js
vendored
8
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
5
js/bootstrap-modal.js
vendored
5
js/bootstrap-modal.js
vendored
@ -70,13 +70,12 @@
|
|||||||
that.$element
|
that.$element
|
||||||
.addClass('in')
|
.addClass('in')
|
||||||
.attr('aria-hidden', false)
|
.attr('aria-hidden', false)
|
||||||
.focus()
|
|
||||||
|
|
||||||
that.enforceFocus()
|
that.enforceFocus()
|
||||||
|
|
||||||
transition ?
|
transition ?
|
||||||
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
|
that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
|
||||||
that.$element.trigger('shown')
|
that.$element.focus().trigger('shown')
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user