Skip to content

Commit 62f2585

Browse files
ENGCOM-6123: Removed box-shadow on clicking disabled swatch option #25145
2 parents e58535d + 58a8e02 commit 62f2585

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

app/code/Magento/Swatches/view/frontend/web/js/swatch-renderer.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,10 @@ define([
840840
*/
841841
_Rewind: function (controls) {
842842
controls.find('div[option-id], option[option-id]').removeClass('disabled').removeAttr('disabled');
843-
controls.find('div[option-empty], option[option-empty]').attr('disabled', true).addClass('disabled');
843+
controls.find('div[option-empty], option[option-empty]')
844+
.attr('disabled', true)
845+
.addClass('disabled')
846+
.attr('tabindex', '-1');
844847
},
845848

846849
/**

app/design/frontend/Magento/blank/Magento_Swatches/web/css/source/_module.less

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
&.selected {
121121
.lib-css(background, @attr-swatch-option__selected__background);
122122
.lib-css(border, @attr-swatch-option__selected__border);
123-
.lib-css(color, @attr-swatch-option__selected__color);
123+
.lib-css(color, @attr-swatch-option__selected__color);
124124
}
125125
}
126126
}
@@ -180,7 +180,9 @@
180180
}
181181

182182
&.disabled {
183+
box-shadow: unset;
183184
cursor: default;
185+
pointer-events: none;
184186

185187
&:after {
186188
// ToDo: improve .lib-background-gradient() to support diagonal gradient

0 commit comments

Comments
 (0)