Skip to content

Conversation

@SnapeEye
Copy link

@SnapeEye SnapeEye commented Jan 28, 2022

Bug summary:
When Link is rendered in a component that is a Route element and Link was connected successfuly unless 1 time, link iframe is not destroyed after going to another Route.

Preconditions:

  • Simple App with BrowserRouter
  • 2 page:
  1. first with Plaid Link (route /) and navigation link to second page
  2. second should be blank, used only to emulate Route change (route /test)

Steps to reproduce:

  • Use Link and connect to any Bank
  • Enter valid credentials, start auth
  • Should connect successfully & press Continue button to close the Link

Expected:
After changing route from / to /test (using navigation link on first page), Plaid Link iframe should be destroyed

Actual:
After changing route from / to /test (using navigation link on first page), Plaid Link iframe is not destroyed and affects other pages elements with artefacts

As I investigated, factory open state is not set to false after Link is successfully connected and closed via Connect button. So, when the Link was used at least once, the open state is true and iframe is hidden. As a result, plaid exit method skip calling its callback argument as state.open is still true.

@skylarmb
Copy link
Contributor

skylarmb commented Apr 4, 2022

hey @SnapeEye we recently just fixed an issue with exit() not working correctly (#242), and a few weeks ago fixed an issue related to how the iframe cleans up after itself on destroy (internal, not in this repo). Can you update to v3.3.1 and let me know if this is still an issue for you?

@SnapeEye
Copy link
Author

SnapeEye commented Apr 5, 2022

Hi, @skylarmb
Updated to 3.3.1, tested it - the issue is still here.
Used the Link, changed the Route - iframe is still in DOM. Moved backward - got 2 iframes in DOM.

@SnapeEye
Copy link
Author

SnapeEye commented Apr 5, 2022

@skylarmb
Here is the proof. IDK what was changed for current version, but open state is still not being updated after the Link is closed.

GIF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants