-
Notifications
You must be signed in to change notification settings - Fork 27.5k
fix(removePatch): fire $destroy event when full jQuery is used #1512
Conversation
The previous code relied upon internal jQuery structures which are not present in v.1.8.2 (current). This code uses the public API to fire the $destroy custom event, and so should work with any post-1.4 jQuery version.
event bubbling and introducing other issues
is there any failing test for this issue? if not can you please write one in jqLiteSpec.js |
I see that our tests are failing when we run them against jquery 1.8.2 |
I like the use of triggerHandler, that's what we need. but in order to be able to merge this we need to add triggerHandler to jqLite. can you implement it please? |
I added jquery 1.8.2 to our repo in this branch: https://github.com/IgorMinar/angular.js/tree/jquery-1.8.2 can you rebase your branch on top of it? |
for instructions on how to run our tests please check out: docs.angularjs.org/misc/contribute |
Sure, no problem - it'll probably be tomorrow now as it's getting late over here now |
More likely to be the weekend in reality, sorry. |
OK, I'm clearly stupid as I'm unable to work out how to rebase my repository. Given my git config pasted below, could you please give me a pointer as to what I need to do to achieve the rebase? My unsuccessful attempts consisted of git rebase "https://github.com/IgorMinar/angular.js.git", all of which give errors along the lines of git config output: [core] |
git remote add IgorMinar https://github.com/IgorMinar/angular.js.git |
in jQuery 1.8.x the data() data structure is changed and events are not accessible via data().events. Since all we need is to trigger all event handlers, we can do so via triggerHandler() api instead of mocking with the internal jQuery data structures. This fix was originally proposed by PeteAppleton via PR angular#1512. Closes angular#1512
in jQuery 1.8.x the data() data structure is changed and events are not accessible via data().events. Since all we need is to trigger all event handlers, we can do so via triggerHandler() api instead of mocking with the internal jQuery data structures. This fix was originally proposed by PeteAppleton via PR #1512. Closes #1512
We found an issue where jQuery 1.8.2 is used where form controls created by ngRepeat are never removed from the parent form because the $destroy custom event is not fired. As a result, if a control was invalid (due to the model binding) and then destroyed the form's validity state became out-of-sync with the model and impossible to restore. This patch corrects the issue.
The previous code relied upon internal jQuery structures which are not
present in v.1.8.2 (current). This code uses the public API to fire the
$destroy custom event, and so should work with any post-1.4 jQuery
version.