Skip to content

Commit

Permalink
fix carousel when hiding a reshowing - make sure it always triggers t…
Browse files Browse the repository at this point in the history
…ransition end #3248
  • Loading branch information
fat committed Jun 3, 2012
1 parent 0b82796 commit 555a3b0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/assets/js/bootstrap-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()

This comment has been minimized.

Copy link
@jkresner

jkresner Jun 3, 2012

Now my carousel won't stop when I call pause

This comment has been minimized.

Copy link
@fat

fat Jun 3, 2012

Author Member

interesting i'll take a look

This comment has been minimized.

Copy link
@fat

fat Jun 3, 2012

Author Member

fixed - thanks for the heads up!

This comment has been minimized.

Copy link
@andreif

andreif Dec 9, 2012

Hm, fixed where? What is this.cycle() for? Removing it fixes the issue.

This comment has been minimized.

Copy link
@andreif

andreif Dec 9, 2012

See issue #5747

This comment has been minimized.

Copy link
@fat

fat Feb 8, 2013

Author Member

fixed in 2.3 which isn't released yet

}
clearInterval(this.interval)
this.interval = null
return this
Expand Down
4 changes: 3 additions & 1 deletion docs/assets/js/bootstrap-typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@
}

, move: function (e) {
if (!this.shown) return

switch(e.keyCode) {
case 9: // tab
case 13: // enter
Expand Down Expand Up @@ -205,7 +207,7 @@
}

, keypress: function (e) {
if (!this.shown || this.suppressKeyPressRepeat) return
if (this.suppressKeyPressRepeat) return
this.move(e)
}

Expand Down
8 changes: 7 additions & 1 deletion docs/assets/js/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1772,6 +1776,8 @@
}

, move: function (e) {
if (!this.shown) return

switch(e.keyCode) {
case 9: // tab
case 13: // enter
Expand Down Expand Up @@ -1799,7 +1805,7 @@
}

, keypress: function (e) {
if (!this.shown || this.suppressKeyPressRepeat) return
if (this.suppressKeyPressRepeat) return
this.move(e)
}

Expand Down
Loading

0 comments on commit 555a3b0

Please sign in to comment.