MDL-50937 tag: Stop using deprecated context
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 20 Jul 2016 02:29:41 +0000 (10:29 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 20 Jul 2016 03:19:29 +0000 (11:19 +0800)
$.context has been deprecated for a long time - since before this code was
written. Unfortunately jQuery does not emit anything for deprecated code so
this was not picked up sooner.

lib/amd/build/tag.min.js
lib/amd/src/tag.js

index aed3712..9473560 100644 (file)
Binary files a/lib/amd/build/tag.min.js and b/lib/amd/build/tag.min.js differ
index c65122f..7d0c27b 100644 (file)
@@ -36,7 +36,7 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str'
             $('body').delegate('.tagarea[data-ta] a[data-quickload=1]', 'click', function(e) {
                 e.preventDefault();
                 var target = $(this),
-                    query = target.context.search.replace(/^\?/, ''),
+                    query = target[0].search.replace(/^\?/, ''),
                     tagarea = target.closest('.tagarea[data-ta]'),
                     args = query.split('&').reduce(function(s, c) {
                       var t = c.split('=');