You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: document.querySelector(...).parentElement.submit is not a function
at VueComponent. (StripeCheckout.vue:165)
at Array. (vue.js:661)
at nextTickHandler (vue.js:608)
at
handleError @ vue.js:529
(anonymous) @ vue.js:663
nextTickHandler @ vue.js:608
One way of avoiding the TypeError: document.querySelector(...).parentElement.submit is not a function-problem is to configure vue-stripe to use the on-success="broadcast" option to handle the submission yourself (with the good side-effect that you avoid the document.querySelector('#'+this.formId).parentElement.submit() call to be executed)
I also was having the same issue and this issue is really easy to solve.
parentElement is looking for the immediate parent of stripe-checkout in your case you have a div, that's why the error is displayed, because submit function cannot work with a div so the easy way to solve that is deleting that div or setting your stripe-checkout inside the form immediately.
please help :)
i use NUXT
TypeError: document.querySelector(...).parentElement.submit is not a function
at VueComponent. (StripeCheckout.vue:165)
at Array. (vue.js:661)
at nextTickHandler (vue.js:608)
at
handleError @ vue.js:529
(anonymous) @ vue.js:663
nextTickHandler @ vue.js:608
My template:
The text was updated successfully, but these errors were encountered: