mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-20 17:54:23 +01:00
fix carousel when hiding a reshowing - make sure it always triggers transition end #3248
This commit is contained in:
parent
0b827965d3
commit
555a3b0478
4
docs/assets/js/bootstrap-carousel.js
vendored
4
docs/assets/js/bootstrap-carousel.js
vendored
@ -68,6 +68,10 @@
|
|||||||
|
|
||||||
, pause: function (e) {
|
, pause: function (e) {
|
||||||
if (!e) this.paused = true
|
if (!e) this.paused = true
|
||||||
|
if (this.$element.find('.next, .prev')) {
|
||||||
|
this.$element.trigger($.support.transition.end)
|
||||||
|
this.cycle()
|
||||||
|
}
|
||||||
clearInterval(this.interval)
|
clearInterval(this.interval)
|
||||||
this.interval = null
|
this.interval = null
|
||||||
return this
|
return this
|
||||||
|
4
docs/assets/js/bootstrap-typeahead.js
vendored
4
docs/assets/js/bootstrap-typeahead.js
vendored
@ -178,6 +178,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
, move: function (e) {
|
, move: function (e) {
|
||||||
|
if (!this.shown) return
|
||||||
|
|
||||||
switch(e.keyCode) {
|
switch(e.keyCode) {
|
||||||
case 9: // tab
|
case 9: // tab
|
||||||
case 13: // enter
|
case 13: // enter
|
||||||
@ -205,7 +207,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
, keypress: function (e) {
|
, keypress: function (e) {
|
||||||
if (!this.shown || this.suppressKeyPressRepeat) return
|
if (this.suppressKeyPressRepeat) return
|
||||||
this.move(e)
|
this.move(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
docs/assets/js/bootstrap.js
vendored
8
docs/assets/js/bootstrap.js
vendored
@ -312,6 +312,10 @@
|
|||||||
|
|
||||||
, pause: function (e) {
|
, pause: function (e) {
|
||||||
if (!e) this.paused = true
|
if (!e) this.paused = true
|
||||||
|
if (this.$element.find('.next, .prev')) {
|
||||||
|
this.$element.trigger($.support.transition.end)
|
||||||
|
this.cycle()
|
||||||
|
}
|
||||||
clearInterval(this.interval)
|
clearInterval(this.interval)
|
||||||
this.interval = null
|
this.interval = null
|
||||||
return this
|
return this
|
||||||
@ -1772,6 +1776,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
, move: function (e) {
|
, move: function (e) {
|
||||||
|
if (!this.shown) return
|
||||||
|
|
||||||
switch(e.keyCode) {
|
switch(e.keyCode) {
|
||||||
case 9: // tab
|
case 9: // tab
|
||||||
case 13: // enter
|
case 13: // enter
|
||||||
@ -1799,7 +1805,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
, keypress: function (e) {
|
, keypress: function (e) {
|
||||||
if (!this.shown || this.suppressKeyPressRepeat) return
|
if (this.suppressKeyPressRepeat) return
|
||||||
this.move(e)
|
this.move(e)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
docs/assets/js/bootstrap.min.js
vendored
2
docs/assets/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
4
js/bootstrap-carousel.js
vendored
4
js/bootstrap-carousel.js
vendored
@ -68,6 +68,10 @@
|
|||||||
|
|
||||||
, pause: function (e) {
|
, pause: function (e) {
|
||||||
if (!e) this.paused = true
|
if (!e) this.paused = true
|
||||||
|
if (this.$element.find('.next, .prev')) {
|
||||||
|
this.$element.trigger($.support.transition.end)
|
||||||
|
this.cycle()
|
||||||
|
}
|
||||||
clearInterval(this.interval)
|
clearInterval(this.interval)
|
||||||
this.interval = null
|
this.interval = null
|
||||||
return this
|
return this
|
||||||
|
Loading…
x
Reference in New Issue
Block a user