1
0
Fork 0
mirror of https://github.com/twbs/bootstrap.git synced 2022-11-09 12:25:43 -05:00

fix carousel when hiding a reshowing - make sure it always triggers transition end #3248

This commit is contained in:
Jacob Thornton 2012-06-02 20:28:08 -07:00
parent 0b827965d3
commit 555a3b0478
5 changed files with 19 additions and 3 deletions

View file

@ -68,6 +68,10 @@
, pause: function (e) {
if (!e) this.paused = true
if (this.$element.find('.next, .prev')) {
this.$element.trigger($.support.transition.end)
this.cycle()
}
clearInterval(this.interval)
this.interval = null
return this

View file

@ -178,6 +178,8 @@
}
, move: function (e) {
if (!this.shown) return
switch(e.keyCode) {
case 9: // tab
case 13: // enter
@ -205,7 +207,7 @@
}
, keypress: function (e) {
if (!this.shown || this.suppressKeyPressRepeat) return
if (this.suppressKeyPressRepeat) return
this.move(e)
}

View file

@ -312,6 +312,10 @@
, pause: function (e) {
if (!e) this.paused = true
if (this.$element.find('.next, .prev')) {
this.$element.trigger($.support.transition.end)
this.cycle()
}
clearInterval(this.interval)
this.interval = null
return this
@ -1772,6 +1776,8 @@
}
, move: function (e) {
if (!this.shown) return
switch(e.keyCode) {
case 9: // tab
case 13: // enter
@ -1799,7 +1805,7 @@
}
, keypress: function (e) {
if (!this.shown || this.suppressKeyPressRepeat) return
if (this.suppressKeyPressRepeat) return
this.move(e)
}

File diff suppressed because one or more lines are too long

View file

@ -68,6 +68,10 @@
, pause: function (e) {
if (!e) this.paused = true
if (this.$element.find('.next, .prev')) {
this.$element.trigger($.support.transition.end)
this.cycle()
}
clearInterval(this.interval)
this.interval = null
return this