Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / views_ui / src / ViewListBuilder.php
index 628408e997fde5837e1c4ad0f67108783314afad..c690aee99bf98341a098d1c58497c06b71d44799 100644 (file)
@@ -178,6 +178,14 @@ class ViewListBuilder extends ConfigEntityListBuilder {
       }
     }
 
+    // ajax.js focuses automatically on the data-drupal-selector element. When
+    // enabling the view again, focusing on the disable link doesn't work, as it
+    // is hidden. We assign data-drupal-selector to every link, so it focuses
+    // on the edit link.
+    foreach ($operations as &$operation) {
+      $operation['attributes']['data-drupal-selector'] = 'views-listing-' . $entity->id();
+    }
+
     return $operations;
   }