Skip to content

Commit 3fc0360

Browse files
[Magento Community Engineering] Community Contributions - 2.3-develop
- merged latest code from mainline branch
2 parents 84647d8 + f2d026d commit 3fc0360

File tree

4 files changed

+38
-10
lines changed

4 files changed

+38
-10
lines changed

app/code/Magento/Checkout/view/frontend/web/js/view/summary/shipping.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55

66
define([
77
'jquery',
8+
'underscore',
89
'Magento_Checkout/js/view/summary/abstract-total',
910
'Magento_Checkout/js/model/quote',
1011
'Magento_SalesRule/js/view/summary/discount'
11-
], function ($, Component, quote, discountView) {
12+
], function ($, _, Component, quote, discountView) {
1213
'use strict';
1314

1415
return Component.extend({
@@ -22,19 +23,23 @@ define([
2223
* @return {*}
2324
*/
2425
getShippingMethodTitle: function () {
25-
var shippingMethod = '',
26+
var shippingMethod,
2627
shippingMethodTitle = '';
2728

2829
if (!this.isCalculated()) {
2930
return '';
3031
}
3132
shippingMethod = quote.shippingMethod();
3233

34+
if (!_.isArray(shippingMethod) && !_.isObject(shippingMethod)) {
35+
return '';
36+
}
37+
3338
if (typeof shippingMethod['method_title'] !== 'undefined') {
3439
shippingMethodTitle = ' - ' + shippingMethod['method_title'];
3540
}
3641

37-
return shippingMethod ?
42+
return shippingMethodTitle ?
3843
shippingMethod['carrier_title'] + shippingMethodTitle :
3944
shippingMethod['carrier_title'];
4045
},

app/code/Magento/Customer/view/frontend/templates/form/edit.phtml

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
</div>
6868
</div>
6969
</div>
70-
<div class="field confirm password required" data-container="confirm-password">
70+
<div class="field confirmation password required" data-container="confirm-password">
7171
<label class="label" for="password-confirmation"><span><?= $block->escapeHtml(__('Confirm New Password')) ?></span></label>
7272
<div class="control">
7373
<input type="password" class="input-text" name="password_confirmation" id="password-confirmation"
@@ -93,7 +93,7 @@
9393
], function($){
9494
var dataForm = $('#form-validate');
9595
var ignore = <?= /* @noEscape */ $_dob->isEnabled() ? '\'input[id$="full"]\'' : 'null' ?>;
96-
96+
9797
dataForm.mage('validation', {
9898
<?php if ($_dob->isEnabled()) : ?>
9999
errorPlacement: function(error, element) {

lib/web/css/source/lib/_navigation.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
338338
top: 0;
339339
left: 100%;
340340
width: 10px;
341-
height: calc(100% + 3px);
341+
height: calc(~'100% + 3px');
342342
z-index: 1;
343343
}
344344
}

lib/web/mage/tabs.js

+27-4
Original file line numberDiff line numberDiff line change
@@ -102,28 +102,51 @@ define([
102102
* @private
103103
*/
104104
_processPanels: function () {
105-
this.contents = this.element.find(this.options.content);
105+
var isNotNested = this._isNotNested.bind(this);
106106

107-
this.collapsibles = this.element.find(this.options.collapsibleElement);
107+
this.contents = this.element
108+
.find(this.options.content)
109+
.filter(isNotNested);
110+
111+
this.collapsibles = this.element
112+
.find(this.options.collapsibleElement)
113+
.filter(isNotNested);
108114

109115
this.collapsibles
110116
.attr('role', 'presentation')
111117
.parent()
112118
.attr('role', 'tablist');
113119

114-
this.headers = this.element.find(this.options.header);
120+
this.headers = this.element
121+
.find(this.options.header)
122+
.filter(isNotNested);
115123

116124
if (this.headers.length === 0) {
117125
this.headers = this.collapsibles;
118126
}
119-
this.triggers = this.element.find(this.options.trigger);
127+
this.triggers = this.element
128+
.find(this.options.trigger)
129+
.filter(isNotNested);
120130

121131
if (this.triggers.length === 0) {
122132
this.triggers = this.headers;
123133
}
124134
this._callCollapsible();
125135
},
126136

137+
/**
138+
* Checks if element is not in nested container to keep the correct scope of collapsible
139+
* @param {Number} index
140+
* @param {HTMLElement} element
141+
* @private
142+
* @return {Boolean}
143+
*/
144+
_isNotNested: function (index, element) {
145+
var parentContent = $(element).parents(this.options.content);
146+
147+
return !parentContent.length || !this.element.find(parentContent).length;
148+
},
149+
127150
/**
128151
* Setting the disabled and active tabs and calling instantiation of collapsible
129152
* @private

0 commit comments

Comments
 (0)