Skip to content

Commit

Permalink
Only hide fields that are the direct decendent of the valid matrix bl…
Browse files Browse the repository at this point in the history
…ock.

Goes some way to helping #7
  • Loading branch information
joshangell committed Aug 29, 2018
1 parent 3bc6f2c commit eae4ad3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/assetbundles/spoon/dist/css/Spoon.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ body.rtl .buttons-spooned > .btn, body.rtl .buttons-spooned > .btngroup { margin
*/

/* hide all matrix block fields */
.matrix-field .matrixblock .fields {
.matrix-field > .blocks > .matrixblock > .fields {
-webkit-opacity: 0;
-moz-opacity: 0;
opacity: 0;
}

/* don’t break blocks that don’t need spooning */
.matrixblock.matrixblock-not-spooned .fields {
.matrixblock.matrixblock-not-spooned > .fields {
-webkit-opacity: 1 !important;
-moz-opacity: 1 !important;
opacity: 1 !important;
Expand Down
2 changes: 1 addition & 1 deletion src/assetbundles/spoon/dist/js/FieldManipulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@

// Make our own fields container and hide the native one, but keep its height
var $spoonedFields = $('<div class="spoon-fields"/>').css({ 'opacity' : 0 }).appendTo($matrixBlock),
$fields = $matrixBlock.find('.fields');
$fields = $matrixBlock.find('> .fields');
$fields.css({ 'opacity' : 0 });

// Wait a bit for the add block animation to finish
Expand Down

0 comments on commit eae4ad3

Please sign in to comment.