We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97eb9ae commit fb31225Copy full SHA for fb31225
app/code/Magento/PageCache/view/frontend/web/js/form-key-provider.js
@@ -55,6 +55,10 @@ define(function () {
55
return null;
56
}
57
58
+ function getFormKeyFromUI() {
59
+ return document.querySelector(inputSelector).value;
60
+ }
61
+
62
/**
63
* Generate form key string
64
* @private
@@ -79,7 +83,7 @@ define(function () {
79
83
formKey = getFormKeyCookie();
80
84
81
85
if (!formKey) {
82
- formKey = generateFormKeyString();
86
+ formKey = getFormKeyFromUI() || generateFormKeyString();
87
setFormKeyCookie(formKey);
88
89
inputElements = document.querySelectorAll(inputSelector);
0 commit comments