Describe the bug A clear and concise description of what the bug is.
I am using Vite / Vue and I am trying to preventDefault in google-pay-button's onClick. But I've tried a low of different ways and it seems to have some bug.
To Reproduce Steps to reproduce the behavior:
Install the component in Vue
do @click="(event)=> {event.preventDefault()}"
It will still open the payment sheet.
Expected behavior It should prevent the payment sheet.
Screenshots NA
Component information:
Component
[ ] Custom element (@google-pay/button-element)
Component version (e.g. 3.1.0):
Environment:
Device iMac
OS (e.g. 14.2.1 (23C71)):
Browser (e.g. Chrome)
Country/region: UK
Please don't hesitate to ask me any further questions. Looks like this line has some issues.
const request = this.createLoadPaymentDataRequest(config); try { if (config.onClick) { config.onClick(event); } if (event.defaultPrevented) { return; }
Describe the bug A clear and concise description of what the bug is. I am using Vite / Vue and I am trying to preventDefault in google-pay-button's onClick. But I've tried a low of different ways and it seems to have some bug.
To Reproduce Steps to reproduce the behavior:
Expected behavior It should prevent the payment sheet.
Screenshots NA Component information:
@google-pay/button-element
) Component version (e.g. 3.1.0):Environment:
Please don't hesitate to ask me any further questions. Looks like this line has some issues.
const request = this.createLoadPaymentDataRequest(config); try { if (config.onClick) { config.onClick(event); } if (event.defaultPrevented) { return; }