From 2ed755e8c514db4b89bb4d9244ceae04cf723319 Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Wed, 5 Jun 2013 16:16:00 -0700 Subject: [PATCH] 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. --- r2/r2/public/static/js/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/public/static/js/ui.js b/r2/r2/public/static/js/ui.js index c76413c2c..b638fd207 100644 --- a/r2/r2/public/static/js/ui.js +++ b/r2/r2/public/static/js/ui.js @@ -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()