diff options
| author | Michał Gołębiowski | 2013-04-30 11:29:07 +0200 |
|---|---|---|
| committer | Vojta Jina | 2013-05-23 12:05:55 -0700 |
| commit | da5f537ccdb0a7b4155f13f7a70ca7981ad6f689 (patch) | |
| tree | 30fc4349dc22289d110f1bfdea0db076121a89c0 /src/Angular.js | |
| parent | 041f118b01933fa07098f1333be8e2cf1a28f248 (diff) | |
| download | angular.js-da5f537ccdb0a7b4155f13f7a70ca7981ad6f689.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 7bbee592..aefe7ad5 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -1040,9 +1040,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; } |
