diff -u b/core/misc/tabledrag.js b/core/misc/tabledrag.js --- b/core/misc/tabledrag.js +++ b/core/misc/tabledrag.js // Make each applicable row draggable. // Match immediate children of the parent element to allow nesting. - $table.find('> tr.draggable, > tbody > tr.draggable').each(function () { - self.makeDraggable(this); - }); + $table.find('> tr.draggable, > tbody > tr.draggable').each(function () { self.makeDraggable(this); }); // Add a link before the table for users to show or hide weight columns. $table.before($('') @@ -238,18 +237,10 @@ // Add event bindings to the document. The self variable is passed along // as event handlers do not have direct access to the tableDrag object. - $(document).on('touchmove', function (event) { - return self.dragRow(event.originalEvent.touches[0], self); - }); - $(document).on('touchend', function (event) { - return self.dropRow(event.originalEvent.touches[0], self); - }); - $(document).on('mousemove pointermove', function (event) { - return self.dragRow(event, self); - }); - $(document).on('mouseup pointerup', function (event) { - return self.dropRow(event, self); - }); + $(document).on('touchmove', function (event) { return self.dragRow(event.originalEvent.touches[0], self); }); + $(document).on('touchend', function (event) { return self.dropRow(event.originalEvent.touches[0], self); }); + $(document).on('mousemove pointermove', function (event) { return self.dragRow(event, self); }); + $(document).on('mouseup pointerup', function (event) { return self.dropRow(event, self); }); // React to localStorage event showing or hiding weight columns. $(window).on('storage', $.proxy(function (e) { @@ -697,7 +688,7 @@ * The tableDrag instance. * * @return {bool|undefined} - * Undefined if not dragObject is defined, false otherwise. + * Undefined if no dragObject is defined, false otherwise. */ Drupal.tableDrag.prototype.dragRow = function (event, self) { if (self.dragObject) { @@ -822,7 +813,7 @@ * The pointer event. * * @return {object} - * An object with x and y keys indicating the position. + * An object with `x` and `y` keys indicating the position. */ Drupal.tableDrag.prototype.pointerCoords = function (event) { if (event.pageX || event.pageY) { @@ -846,7 +837,7 @@ * The pointer event. * * @return {object} - * An object with x and y keys indicating the position. + * An object with `x` and `y` keys indicating the position. */ Drupal.tableDrag.prototype.getPointerOffset = function (target, event) { var docPos = $(target).offset(); @@ -1346,7 +1337,7 @@ * (or null for last position in the table). * * @return {object} - * An object with the keys "min" and "max" to indicate the valid indent + * An object with the keys `min` and `max` to indicate the valid indent * interval. */ Drupal.tableDrag.prototype.row.prototype.validIndentInterval = function (prevRow, nextRow) {