diff --git a/core/modules/outside_in/src/Ajax/OpenOffCanvasDialogCommand.php b/core/modules/outside_in/src/Ajax/OpenOffCanvasDialogCommand.php
index d78dc35..571f27b 100644
--- a/core/modules/outside_in/src/Ajax/OpenOffCanvasDialogCommand.php
+++ b/core/modules/outside_in/src/Ajax/OpenOffCanvasDialogCommand.php
@@ -11,6 +11,8 @@
  */
 class OpenOffCanvasDialogCommand extends OpenDialogCommand {
 
+  const DIALOG_WIDTH = 300;
+
   /**
    * Constructs an OpenOffCanvasDialogCommand object.
    *
@@ -42,6 +44,9 @@ public function __construct($title, $content, array $dialog_options = [], $setti
     // @todo drupal.ajax.js does not respect drupalAutoButtons properly, pass an
     //   empty set of buttons until https://www.drupal.org/node/2793343 is in.
     $this->dialogOptions['buttons'] = [];
+    if (empty($this->dialogOptions['width'])) {
+      $this->dialogOptions['width'] = self::DIALOG_WIDTH;
+    }
   }
 
   /**
diff --git a/core/modules/outside_in/tests/src/FunctionalJavascript/OffCanvasTest.php b/core/modules/outside_in/tests/src/FunctionalJavascript/OffCanvasTest.php
index 8e04fd8..1bd8fa2 100644
--- a/core/modules/outside_in/tests/src/FunctionalJavascript/OffCanvasTest.php
+++ b/core/modules/outside_in/tests/src/FunctionalJavascript/OffCanvasTest.php
@@ -59,6 +59,10 @@ public function testOffCanvasLinks() {
 
           $style = $page->find('css', '.ui-dialog-offcanvas')->getAttribute('style');
           self::assertTrue(strstr($style, 'width: 555px;') !== FALSE, 'Dialog width respected.');
+          $page->clickLink("Click Me 1!");
+          $this->waitForOffCanvasToOpen();
+          $style = $page->find('css', '.ui-dialog-offcanvas')->getAttribute('style');
+          self::assertTrue(strstr($style, 'width: 555px;') === FALSE, 'Dialog width reset to default.');
         }
         else {
           // Check that header is correct.
