From a3b4919b60769522fb971634d2cd3fb1a0cdcff0 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Tue, 13 Sep 2022 09:33:58 +0100
Subject: [PATCH] Issue #3309341 by lauriii, nod_: Remove toolbar/toolbar
 dependency on Modernizr

---
 .../src/FunctionalJavascript/ToolbarIntegrationTest.php    | 2 --
 core/modules/toolbar/toolbar.libraries.yml                 | 7 -------
 2 files changed, 9 deletions(-)

diff --git a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php
index 62eeca51f5d7..9666a3af81db 100644
--- a/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php
+++ b/core/modules/toolbar/tests/src/FunctionalJavascript/ToolbarIntegrationTest.php
@@ -37,8 +37,6 @@ public function testToolbarToggling() {
     $this->drupalGet('<front>');
     $this->assertNotEmpty($this->assertSession()->waitForElement('css', 'body.toolbar-horizontal'));
     $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', '.toolbar-tray'));
-    // Confirm touchevents detection is loaded with the toolbar.
-    $this->assertNotNull($this->assertSession()->waitForElement('css', 'html.no-touchevents'));
 
     $page = $this->getSession()->getPage();
 
diff --git a/core/modules/toolbar/toolbar.libraries.yml b/core/modules/toolbar/toolbar.libraries.yml
index 146942e03119..061bd7a98b4d 100644
--- a/core/modules/toolbar/toolbar.libraries.yml
+++ b/core/modules/toolbar/toolbar.libraries.yml
@@ -18,13 +18,6 @@ toolbar:
       css/toolbar.theme.css: {}
       css/toolbar.icons.theme.css: {}
   dependencies:
-    - core/modernizr
-    # Toolbar does not use touchevents detection, nor does it use Modernizr.
-    # Despite not using Modernizr, it loads it. Sites that expect modernizr to
-    # be available may be getting it due to it being part of Toolbar. Because
-    # of this, we must include drupal.touchevents-test so the expected
-    # `touchevents/no-touchevents` classes are still added to the page.
-    - core/drupal.touchevents-test
     - core/jquery
     - core/drupal
     - core/drupalSettings
-- 
GitLab