From d36b90ce40f01a65ce10693b636d734980c9f2a9 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 7 May 2015 18:54:07 -0700 Subject: [PATCH] removeLabel: remove listeners before detaching. --- lib/widgets/element.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/widgets/element.js b/lib/widgets/element.js index ca9d267..6fdedbe 100644 --- a/lib/widgets/element.js +++ b/lib/widgets/element.js @@ -993,9 +993,9 @@ Element.prototype.setLabel = function(options) { Element.prototype.removeLabel = function() { if (!this._label) return; - this._label.detach(); this.removeListener('scroll', this._labelScroll); this.removeListener('resize', this._labelResize); + this._label.detach(); delete this._labelScroll; delete this._labelResize; delete this._label;