Skip to content

Commit 83044ca

Browse files
author
Stanislav Idolov
authored
🔃 [EngCom] Public Pull Requests - 2.1-develop
Accepted Public Pull Requests: - #17240: [Backport] Resolved : Mobile device style groups incorrect order (by @tiagosampaio) - #17223: [Backport] Fix for #14593 (second try #16431) (by @gelanivishal) - #17211: [Backport] Fixed ability to set field config from layout xml #11302 (by @mageprince) - #17212: [Backport] Magento sets ISO invalid language code (by @mageprince) - #17213: [Backport 2.1] Fix "pattern" UI Component validation (by @mageprince) Fixed GitHub Issues: - #14476: Mobile device style groups incorrect order in _responsive.less (reported by @damiandawber) has been fixed in #17240 by @tiagosampaio in 2.1-develop branch Related commits: 1. b957e32 - #14593: Press Esc Key on modal generate a jquery UI error (reported by @apomili) has been fixed in #17223 by @gelanivishal in 2.1-develop branch Related commits: 1. b50caeb 2. 540cdb5 3. d937ca7 - #11540: Magento sets iso invalid language code in html header (reported by @SirElectro) has been fixed in #17212 by @mageprince in 2.1-develop branch Related commits: 1. 6702cdc - #9919: Pattern Validation via UI Component Fails to Interpret String as RegEx Pattern (reported by @bap14) has been fixed in #17213 by @mageprince in 2.1-develop branch Related commits: 1. 64bad6b 2. 50f4051
2 parents 0b60302 + 02963cc commit 83044ca

File tree

6 files changed

+30
-28
lines changed

6 files changed

+30
-28
lines changed

app/code/Magento/Checkout/Block/Checkout/AttributeMerger.php

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -164,20 +164,19 @@ protected function getFieldConfig(
164164

165165
$element = [
166166
'component' => isset($additionalConfig['component']) ? $additionalConfig['component'] : $uiComponent,
167-
'config' => [
168-
// customScope is used to group elements within a single form (e.g. they can be validated separately)
169-
'customScope' => $dataScopePrefix,
170-
'customEntry' => isset($additionalConfig['config']['customEntry'])
171-
? $additionalConfig['config']['customEntry']
172-
: null,
173-
'template' => 'ui/form/field',
174-
'elementTmpl' => isset($additionalConfig['config']['elementTmpl'])
175-
? $additionalConfig['config']['elementTmpl']
176-
: $elementTemplate,
177-
'tooltip' => isset($additionalConfig['config']['tooltip'])
178-
? $additionalConfig['config']['tooltip']
179-
: null
180-
],
167+
'config' => $this->mergeConfigurationNode(
168+
'config',
169+
$additionalConfig,
170+
[
171+
'config' => [
172+
// customScope is used to group elements within a single
173+
// form (e.g. they can be validated separately)
174+
'customScope' => $dataScopePrefix,
175+
'template' => 'ui/form/field',
176+
'elementTmpl' => $elementTemplate,
177+
],
178+
]
179+
),
181180
'dataScope' => $dataScopePrefix . '.' . $attributeCode,
182181
'label' => $attributeConfig['label'],
183182
'provider' => $providerName,

app/code/Magento/Checkout/view/frontend/web/js/sidebar.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,10 @@ define([
7777
confirm: function () {
7878
self._removeItem($(event.currentTarget));
7979
},
80-
always: function (event) {
81-
event.stopImmediatePropagation();
80+
81+
/** @inheritdoc */
82+
always: function (e) {
83+
e.stopImmediatePropagation();
8284
}
8385
}
8486
});

app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ define([
316316
],
317317
"pattern": [
318318
function(value, param) {
319-
return param.test(value);
319+
return new RegExp(param).test(value);
320320
},
321321
$.mage.__('Invalid format.')
322322
],

app/code/Magento/Ui/view/base/web/js/modal/modal.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,12 @@ define([
100100
/**
101101
* Escape key press handler,
102102
* close modal window
103+
* @param {Object} event - event
103104
*/
104-
escapeKey: function () {
105+
escapeKey: function (event) {
105106
if (this.options.isOpen && this.modal.find(document.activeElement).length ||
106107
this.options.isOpen && this.modal[0] === document.activeElement) {
107-
this.closeModal();
108+
this.closeModal(event);
108109
}
109110
}
110111
}

lib/internal/Magento/Framework/View/Page/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public function __construct(
174174
$this->setElementAttribute(
175175
self::ELEMENT_TYPE_HTML,
176176
self::HTML_ATTRIBUTE_LANG,
177-
str_replace('_', '-', $this->localeResolver->getLocale())
177+
strstr($this->localeResolver->getLocale(), '_', true)
178178
);
179179
}
180180

lib/web/css/source/lib/_responsive.less

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,24 @@
2727

2828
& when (@media-target = 'mobile'), (@media-target = 'all') {
2929

30-
@media only screen and (max-width: (@screen__xxs - 1)) {
31-
.media-width('max', @screen__xxs);
30+
@media only screen and (max-width: @screen__m) {
31+
.media-width('max', (@screen__m + 1));
3232
}
3333

34-
@media only screen and (max-width: (@screen__xs - 1)) {
35-
.media-width('max', @screen__xs);
34+
@media only screen and (max-width: (@screen__m - 1)) {
35+
.media-width('max', @screen__m);
3636
}
3737

3838
@media only screen and (max-width: (@screen__s - 1)) {
3939
.media-width('max', @screen__s);
4040
}
4141

42-
@media only screen and (max-width: (@screen__m - 1)) {
43-
.media-width('max', @screen__m);
42+
@media only screen and (max-width: (@screen__xs - 1)) {
43+
.media-width('max', @screen__xs);
4444
}
4545

46-
@media only screen and (max-width: @screen__m) {
47-
.media-width('max', (@screen__m + 1));
46+
@media only screen and (max-width: (@screen__xxs - 1)) {
47+
.media-width('max', @screen__xxs);
4848
}
4949

5050
@media all and (min-width: @screen__s) {

0 commit comments

Comments
 (0)