Skip to content

Commit

Permalink
Merge pull request #13897 from craftcms/bugfix/cms-1204-inline-matrix…
Browse files Browse the repository at this point in the history
…-disabled-block

fix for actions not being clickable on disabled inline matrix blocks
  • Loading branch information
brandonkelly authored Nov 3, 2023
2 parents beaa914 + c1fe536 commit decfb7a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/templates/_components/fieldtypes/Matrix/block.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% set entryAttributes = {
class: [
'matrixblock',
not entry.enabled ? 'disabled',
not entry.enabled ? 'disabled-entry',
static ? 'static',
]|filter,
data: {
Expand Down
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/css/cp.css.map

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions src/web/assets/cp/src/css/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7492,9 +7492,7 @@ $titlebarBorderRadius: calc(var(--large-border-radius) - 1px);
}
}

&.disabled {
opacity: 1;

&.disabled-entry {
& > .titlebar {
@include padding-right(90px);
}
Expand Down
4 changes: 2 additions & 2 deletions src/web/assets/matrix/src/MatrixInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@

disable: function () {
this.$container.children('input[name$="[enabled]"]:first').val('');
this.$container.addClass('disabled');
this.$container.addClass('disabled-entry');

setTimeout(() => {
this.$actionMenu
Expand All @@ -745,7 +745,7 @@

enable: function () {
this.$container.children('input[name$="[enabled]"]:first').val('1');
this.$container.removeClass('disabled');
this.$container.removeClass('disabled-entry');

setTimeout(() => {
this.$actionMenu
Expand Down

0 comments on commit decfb7a

Please sign in to comment.