-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedbug report
Description
Hey,
On our design we removed the span styles from the minicart "remove" and "edit" links which add the icon. This means that, because the span now has no styles (just shows the text) when you click the link the code in the JS to remove the item now finds the span not the a tag which contains the item id to remove and be sent with the post.
This took me a while to debug and I'm sure others may fall into the same trap. Perhaps something like this would be better.
_removeItem: function(elem) {
if(elem.prop('tagName') !== 'A') {
elem = elem.parent('a');
}
var itemId = elem.data('cart-item');
this._ajax(this.options.url.remove, {
item_id: itemId
}, elem, this._removeItemAfter);
},Thanks
Metadata
Metadata
Assignees
Labels
Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchThe issue has been fixed in 2.4-develop branchIssue: Format is not validGate 1 Failed. Automatic verification of issue format is failedGate 1 Failed. Automatic verification of issue format is failedbug report