Fix duplicate bubble race condition when hiding.

While a bubble is animating the hide, it's possible to show another
bubble within a bubble group. Then, when the hide animation completes,
`hideNow` would be called, clobbering the group state set by the newly
shown bubble.
This commit is contained in:
Max Goodman
2013-06-05 16:16:00 -07:00
parent 4ab51600ef
commit 2ed755e8c5

View File

@@ -234,7 +234,7 @@ r.ui.Bubble = Backbone.View.extend({
hideNow: function() {
this.cancelTimeout()
if (this.options.group) {
if (this.options.group && this.options.group.current == this) {
this.options.group.current = null
}
this.$el.hide()