0

New to using the Trello API and I'm running into an issue with the card buttons and using it to delete the card.

https://glitch.com/edit/#!/360-delete-card?path=public/index.html

The button works and shows up without issue in Trello and it does delete the cards. The problem I'm having is due to when the card has been added.

If the card was created prior to the implementation of the Power Up it deletes without issue and the card pop up window disappears. However, if the card was created after the Power Up was enabled then the pop up window doesn't disappear, it does delete though. If I close the pop up window of the card then the card is gone.

Would anyone be able to help me fix it so that the card pop up disappears when you delete no matter when the card was created?

scopchanov
  • 7,966
  • 10
  • 40
  • 68
  • Thanks for sharing the Glitch project link! That makes it easy to see what is going on. Keep in mind that Trello tokens can be used to read/write to your entire Trello account; so they should be kept secret. You can revoke tokens that have been granted access on your account page: you can go to your account page, and click “revoke” next to the token. https://trello.com/my/account. – Bentley Cook Oct 08 '18 at 20:36
  • What browser are you using? I remixed the Glitch project, put in my API key and token, and tested it on a board. I was able to delete cards via the card-button and each time the card back also closed, returning me to the view of the board but with the deleted card gone. – Bentley Cook Oct 08 '18 at 20:51
  • Thanks for the help! I tried it both in Chrome and FF and have the same issue in both. It is only an issue for cards that have been created after you enable the powerup. Any cards that existed prior to enabling delete and disappear. You're not duplicating the same issue? – Samantha Oct 09 '18 at 21:03
  • You may try adding a [`t.hideCard()`](https://developers.trello.com/reference/#thidecard) and/or a [`t.closePopup()`](https://developers.trello.com/reference/#t-closepopup) after you make the DELETE request. – Bentley Cook Oct 12 '18 at 14:26

0 Answers0