Skip to content

Commit

Permalink
Fixed #3499
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Nov 28, 2018
1 parent 40e1ce7 commit ae05f81
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG-v3.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Release Notes for Craft CMS 3.x

## Unreleased

### Fixed
- Fixed a bug where new Matrix blocks wouldn’t remember that they were supposed to be collapsed if “Save and continue editing” was clicked. ([#3499](https://github.com/craftcms/cms/issues/3499))

## 3.0.33 - 2018-11-27

### Changed
Expand Down
3 changes: 2 additions & 1 deletion src/services/Matrix.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
use craft\models\MatrixBlockType;
use craft\records\MatrixBlockType as MatrixBlockTypeRecord;
use craft\web\assets\matrix\MatrixAsset;
use craft\web\View;
use yii\base\Component;
use yii\base\Exception;

Expand Down Expand Up @@ -713,7 +714,7 @@ public function saveField(MatrixField $field, ElementInterface $owner)
Craft::$app->getSession()->addAssetBundleFlash(MatrixAsset::class);

foreach ($collapsedBlockIds as $blockId) {
Craft::$app->getSession()->addJsFlash('Craft.MatrixInput.rememberCollapsedBlockId(' . $blockId . ');');
Craft::$app->getSession()->addJsFlash('Craft.MatrixInput.rememberCollapsedBlockId(' . $blockId . ');', View::POS_END);
}
}
}
Expand Down

0 comments on commit ae05f81

Please sign in to comment.