diff --git a/js/plugins/drupalentity/plugin.js b/js/plugins/drupalentity/plugin.js
index 2548fe2..895a75b 100644
--- a/js/plugins/drupalentity/plugin.js
+++ b/js/plugins/drupalentity/plugin.js
@@ -83,7 +83,7 @@
           return ourFocusedWidget;
         }
         // If drupalimage is loaded, call that next, to not break its link command integration.
-        if (CKEDITOR.plugins.drupalimage) {
+        if (originalGetFocusedWidget) {
           return originalGetFocusedWidget(editor);
         }
         return null;
diff --git a/tests/src/FunctionalJavascript/MediaImageTest.php b/tests/src/FunctionalJavascript/MediaImageTest.php
index 32f781b..3ffee4d 100644
--- a/tests/src/FunctionalJavascript/MediaImageTest.php
+++ b/tests/src/FunctionalJavascript/MediaImageTest.php
@@ -3,6 +3,7 @@
 namespace Drupal\Tests\entity_embed\FunctionalJavascript;
 
 use Drupal\Component\Utility\Html;
+use Drupal\editor\Entity\Editor;
 use Drupal\entity_embed\Plugin\entity_embed\EntityEmbedDisplay\MediaImageDecorator;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\file\Entity\File;
@@ -574,12 +575,44 @@ class MediaImageTest extends EntityEmbedTestBase {
    * Tests linkability of the CKEditor widget.
    */
   public function testCkeditorWidgetIsLinkable() {
+
+    // Remove DrupalImage.
+    // See https://www.drupal.org/project/entity_embed/issues/3061050
+    $editor = Editor::load('full_html');
+    $settings = $editor->getSettings();
+    $rows = $settings['toolbar']['rows'];
+    foreach ($rows as $row_key => $row) {
+      foreach ($row as $group_key => $group) {
+        foreach ($group['items'] as $item_key => $item) {
+          if ($item === 'DrupalImage') {
+            unset($settings['toolbar']['rows'][$row_key][$group_key]['items'][$item_key]);
+          }
+        }
+      }
+    }
+
+    $editor->setSettings($settings);
+    $editor->save();
+
     $this->host->body->value = '<drupal-entity data-caption="baz" data-embed-button="test_media_entity_embed" data-entity-embed-display="entity_reference:media_thumbnail" data-entity-embed-display-settings="{&quot;image_style&quot;:&quot;&quot;,&quot;image_link&quot;:&quot;&quot;}" data-entity-type="media" data-entity-uuid="' . $this->media->uuid() . '"></drupal-entity>';
     $this->host->save();
 
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('node/' . $this->host->id() . '/edit');
     $this->waitForEditor();
+
+    // Test that drupal link works properly without DrupalImage plugin.
+    // See https://www.drupal.org/project/entity_embed/issues/3061050
+    $this->pressEditorButton('drupallink');
+    $this->assertSession()->waitForId('drupal-modal');
+    $this->assertSession()
+      ->waitForElementVisible('css', '#editor-link-dialog-form')
+      ->findField('attributes[href]')
+      ->setValue('http://www.drupal.org');
+    $this->assertSession()->elementExists('css', 'button.form-submit')->press();
+    $this->assertSession()->assertWaitOnAjaxRequest();
+
+    // Now test linking an entity embed.
     $this->assignNameToCkeditorIframe();
     $this->getSession()->switchToIFrame('ckeditor');
 
