diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js index ae2dec0..5a8b23b 100644 --- a/core/misc/tabledrag.js +++ b/core/misc/tabledrag.js @@ -126,10 +126,9 @@ Drupal.tableDrag = function (table, tableSettings) { $(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); }); } - else { - $(document).on('mousemove', function (event) { return self.dragRow(event, self); }); - $(document).on('mouseup', function (event) { return self.dropRow(event, self); }); - } + + $(document).on('mousemove', function (event) { return self.dragRow(event, self); }); + $(document).on('mouseup', function (event) { return self.dropRow(event, self); }); // React to localStorage event showing or hiding weight columns. $(window).on('storage', $.proxy(function (e) { @@ -331,12 +330,11 @@ Drupal.tableDrag.prototype.makeDraggable = function (item) { self.dragStart(event, self, item); }); } - else { - handle.on('mousedown', function (event) { - event.preventDefault(); - self.dragStart(event, self, item); - }); - } + + handle.on('mousedown', function (event) { + event.preventDefault(); + self.dragStart(event, self, item); + }); // Prevent the anchor tag from jumping us to the top of the page. handle.on('click', function (e) { diff --git a/core/modules/contextual/js/contextual.js b/core/modules/contextual/js/contextual.js index 4616411..ce100c3 100644 --- a/core/modules/contextual/js/contextual.js +++ b/core/modules/contextual/js/contextual.js @@ -256,12 +256,9 @@ Drupal.contextual = { 'click .trigger': function () { this.model.toggleOpen(); }, 'touchend .trigger': touchEndToClick, 'click .contextual-links a': function () { this.model.close().blur(); }, - 'touchend .contextual-links a': touchEndToClick + 'touchend .contextual-links a': touchEndToClick, + 'mouseenter': function () { this.model.focus(); } }; - // We only want mouse hover events on non-touch. - if (!Modernizr.touch) { - mapping.mouseenter = function () { this.model.focus(); }; - } return mapping; }, @@ -390,10 +387,6 @@ Drupal.contextual = { this.model.close().blur().set('regionIsHovered', false); } }; - // We don't want mouse hover events on touch. - if (Modernizr.touch) { - mapping = {}; - } return mapping; },