From cd17061916eaf4f93f8dced4bf097035574976d3 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Thu, 12 Jun 2014 13:33:21 -0700 Subject: [PATCH] Detail view: Cleanup old tab content on change Add event handler on tab change to remove all old tab content. This prevents potential conflicts with referencing widget data caused by old content laying around. --- ui/scripts/ui/widgets/detailView.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js index 2bd07e42e26..6ff36c444bb 100644 --- a/ui/scripts/ui/widgets/detailView.js +++ b/ui/scripts/ui/widgets/detailView.js @@ -1465,7 +1465,12 @@ } } - $detailView.tabs(); + $detailView.tabs({ + select: function() { + // Cleanup old tab content + $detailView.find('.detail-group').children().remove(); + } + }); return $detailView; };