Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preact 10.11.1 is incompatible with Adyen #1794

Closed
AndreasJilvero opened this issue Oct 11, 2022 · 4 comments
Closed

Preact 10.11.1 is incompatible with Adyen #1794

AndreasJilvero opened this issue Oct 11, 2022 · 4 comments
Labels
Bug report Confirmed Issue is confirmed and needs fix

Comments

@AndreasJilvero
Copy link

AndreasJilvero commented Oct 11, 2022

We're using @adyen/adyen-web@5.16.0 which depends on Preact. If you do a fresh install, you will get Preact@10.11.1 which is not compatible with Adyen - maybe following preactjs/preact#3720.

The effect is that Adyen dropdown select items can't be clicked. This is due to select items (the li element) getting a data-disabled="false" attribute which later on prevents the click event due to a if condition if(!t.getAttribute("data-disabled")) { ... }.

image

To clarify, nothing happens if I click on POP Pankki due to the reason I mentioned above.

Edit: You can probably work around this by importing the pre-compiled Adyen file but it's not preferred.

I understand that the issue is not in Adyen code but if possible, Adyen should restrict Preact usage to not 10.11.1.

@m1aw
Copy link
Contributor

m1aw commented Oct 11, 2022

Hey @AndreasJilvero

Thank you for the warning, we where able to reproduce the issue and we will release a new version where we lock the preact version.

However there's workaround you can use in the meantime, or if you can't update the library. You can set resolutions in your package.json as a temporary fix, like so:

"resolutions": {
    "**/preact": "10.5.13"
},

@m1aw m1aw added Bug report Confirmed Issue is confirmed and needs fix labels Oct 11, 2022
@AndreasJilvero
Copy link
Author

@m1aw The solution you suggest seem to rely on either using Yarn or npm-force-resolutions. In our case, we used npm overrides to force the version to 10.10.6.

@ribeiroguilherme
Copy link
Contributor

Hey @AndreasJilvero . Can you upgrade to 5.28.1 and verify if it fixes the issue?

@ribeiroguilherme
Copy link
Contributor

Upgrading the library to > 5.28.1 should fix the issue, therefore I am closing this ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report Confirmed Issue is confirmed and needs fix
Projects
None yet
Development

No branches or pull requests

3 participants