Core javascipt files do not compayible with jQuery 3.1
Core depending on andSelf method from Jquery. This method has been deprecated in Jquery 1.8 and finally removed in 3.0.0
Simple solution just add check in in misc/form.js
+ if (typeof $.fn.andSelf != 'undefined' && $.isFunction($.fn.andSelf)) {
- $(context)
+ $(context)
// Since context could be an input element itself, it's added back to
// the jQuery object and filtered again.
.find(':input').andSelf().filter(':input')
// To prevent duplicate events, the handlers are first removed and then
// (re-)added.
- .unbind(events).bind(events, function () {
+ .unbind(events).bind(events, function () {
$(this).trigger('formUpdated');
});
+ }else {
+ $(context)
+ .find(':input').addBack().filter(':input')
+ .unbind(events).bind(events, function () {
+ $(this).trigger('formUpdated');
+ });
+ }
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Incompability_with_jQuery_3_1_andself_not_defined-2856199.patch | 1.21 KB | amme |
Comments
Comment #2
amme commentedComment #3
cilefen commentedComment #5
mustanggb commentedIsn't this what jQuery Update is for?
Comment #6
amme commentedit seems it work for jquery_migrate plugin
Comment #7
amme commentedComment #8
karamveersingh commented@amme I've been using the same library 3.1 and it is conflicting with 1.8 core library. Before using your patch please confirm Is that patch come in the next updates as part of Core-Drupal 7 ?