When a product adds to the cart the success/exception message is hiding rapidly, So I just tried the below way to show/increase the period of the message. But it's not worked for me.
I have modified the messages.js file as below from vendor/magento/Module-Ui/view/frontend/web/js/view/messages.js
/**
* @param {Boolean} isHidden
*/
onHiddenChange: function (isHidden) {
var self = this;
// Hide message block if needed
if (isHidden) {
setTimeout(function () {
$(self.selector).hide('blind', {}, 500);
}, 50000);
}
}
The above code is not working for me. Please suggest I increase the time of the message.
vendor
directly. Use your own namespace/module to ensure your edits won't get overridden on updates. Also, be sure to clear both Magento's and Browser cache before testing.