Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(datepicker): memory leak fix for datepicker
Browse files Browse the repository at this point in the history
Fixes #2658
Closes #2684
  • Loading branch information
Ankit Kumar authored and chrisirhc committed Sep 15, 2014
1 parent b75f7af commit 08c150e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,9 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
};

var $popup = $compile(popupEl)(scope);
// Prevent jQuery cache memory leak (template is now redundant after linking)
popupEl.remove();

if ( appendToBody ) {
$document.find('body').append($popup);
} else {
Expand Down

0 comments on commit 08c150e

Please sign in to comment.