From 3f687236a5a8a5200dedf72cc0f978c371210575 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 27 Nov 2013 00:18:55 +0000 Subject: [PATCH] Avoid repeated errors if sidebox target is missing by removing listener first --- etemplate/js/et2_widget_favorites.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etemplate/js/et2_widget_favorites.js b/etemplate/js/et2_widget_favorites.js index c2de8f298a..2dc4ac4936 100644 --- a/etemplate/js/et2_widget_favorites.js +++ b/etemplate/js/et2_widget_favorites.js @@ -337,11 +337,11 @@ var et2_favorites = et2_dropdown_button.extend([et2_INextmatchHeader], // Still no sidebox - might be loaded via ajax later, so we'll do this on first mouse over $j('body').on('mouseover','#'+this.options.sidebox_target, jQuery.proxy(function(e) { + $j('body').off(e); // Set up handlers & such this._init_sidebox(); // It will still have the plain HTML, so re-create the contents this.init_filters(this); - $j('body').off(e); },this) ); }