From 446ceb64051730805f5fca5cc61c92d6fb2e841c Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 22 Jul 2021 19:40:14 +0800 Subject: [PATCH] bugfix --- src/core/controller/controller.bubbles.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/controller/controller.bubbles.js b/src/core/controller/controller.bubbles.js index b31843d2f..d020e8aea 100644 --- a/src/core/controller/controller.bubbles.js +++ b/src/core/controller/controller.bubbles.js @@ -20,7 +20,7 @@ BI.BubblesController = BI.inherit(BI.Controller, { */ show: function (name, text, context, opt) { opt || (opt = {}); - var container = opt.container || "body"; + var container = opt.container || context; var offsetStyle = opt.offsetStyle || "left"; var level = opt.level || "error"; var adjustYOffset = opt.adjustYOffset || 0; @@ -76,9 +76,7 @@ BI.BubblesController = BI.inherit(BI.Controller, { if (!this.has(name)) { return this; } - BI.each(this.storeBubbles, function (dir, bubble) { - bubble.destroy(); - }); + this.storeBubbles[name].destroy(); delete this.storeBubbles[name]; return this; }