Skip to content

Commit b13b3ce

Browse files
committed
AC-14683:Investigate compatibility issue with latest version jquery-ui
1 parent d01467e commit b13b3ce

File tree

2 files changed

+13
-10
lines changed
  • app/code/Magento/Msrp/view/frontend/web/js/product/list/columns
  • lib/web/mage/backend

2 files changed

+13
-10
lines changed

app/code/Magento/Msrp/view/frontend/web/js/product/list/columns/msrp-price.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ define([
5353
this.popupOptions.triggerTarget = $trigger;
5454

5555
$popup.dropdownDialog(this.popupOptions)
56-
.dropdownDialog('open');
56+
.dropdownDialog('open');
5757
},
5858

5959
/**

lib/web/mage/backend/tabs.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ define([
9494
isLocal = function (anchor) {
9595
return anchor.hash.length > 1 &&
9696
anchor.href.replace(rhash, '') ===
97-
location.href.replace(rhash, '')
98-
// support: Safari 5.1
99-
// Safari 5.1 doesn't encode spaces in window.location
100-
// but it does encode spaces from anchors (#8777)
101-
.replace(/\s/g, '%20');
97+
location.href.replace(rhash, '')
98+
// support: Safari 5.1
99+
// Safari 5.1 doesn't encode spaces in window.location
100+
// but it does encode spaces from anchors (#8777)
101+
.replace(/\s/g, '%20');
102102
};
103103

104104
// Extension for mage.tabs - Move panels in destination element
@@ -126,12 +126,16 @@ define([
126126

127127
if (!panel.length) {
128128
id = $(tab).attr('aria-controls');
129-
panel = $(this.options.destination).find('#' + CSS.escape(id));
129+
panel = $(this.options.destination).find(this._sanitizeSelector('#' + id));
130130
}
131131

132132
return panel;
133133
},
134134

135+
_sanitizeSelector: function( hash ) {
136+
return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
137+
},
138+
135139
/**
136140
* @private
137141
*/
@@ -168,9 +172,8 @@ define([
168172

169173
// inline tab
170174
if (isLocal(anchor)) {
171-
selector = decodeURIComponent(anchor.hash);
172-
panelId = selector.substring(1);
173-
panel = that.element.find('#' + CSS.escape(panelId));
175+
selector = anchor.hash;
176+
panel = that.document.find(that._sanitizeSelector(selector));
174177
// remote tab
175178
} else {
176179
panelId = tab.attr('aria-controls') || $({}).uniqueId()[ 0 ].id;

0 commit comments

Comments
 (0)