diff options
| author | Michał Gołębiowski | 2013-04-30 11:29:07 +0200 |
|---|---|---|
| committer | Vojta Jina | 2013-05-23 11:45:57 -0700 |
| commit | 815053e403ace666b2383643227ecde5f36742c5 (patch) | |
| tree | 5b307d2cf6fbdd6f023c9c09c0bc56920f655dca /src/Angular.js | |
| parent | 6173abe20bcb99ec4290a513cff43f0c00b74464 (diff) | |
| download | angular.js-815053e403ace666b2383643227ecde5f36742c5.tar.bz2 | |
fix(jqLite): correctly monkey-patch core jQuery methods
When real jQuery is present, Angular monkey patch it to fire `$destroy` event.
This commit fixes two issues in the jQuery patch:
- passing a selector to the $.fn.remove method (only fire `$destroy` on the matched elements)
- using `$.fn.html` without parameters as a getter (do not fire `$destroy`)
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Angular.js b/src/Angular.js index da1bf226..1c1a0255 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -1016,9 +1016,10 @@ function bindJQuery() { injector: JQLitePrototype.injector, inheritedData: JQLitePrototype.inheritedData }); - JQLitePatchJQueryRemove('remove', true); - JQLitePatchJQueryRemove('empty'); - JQLitePatchJQueryRemove('html'); + // Method signature: JQLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments) + JQLitePatchJQueryRemove('remove', true, true, false); + JQLitePatchJQueryRemove('empty', false, false, false); + JQLitePatchJQueryRemove('html', false, false, true); } else { jqLite = JQLite; } |
