Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for actions not being clickable on disabled inline matrix blocks #13897

Merged
merged 3 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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