Closed yevhen-logosha closed 1 year ago
Hi @yevhen-logosha! We do not support such a listener method, but you could try adding a custom event listener to the close button by finding it in HTML when displayed, as described below:
const closeButton = document.querySelector(".ab-feed > .ab-feed-buttons-wrapper > .ab-close-button");
closeButton.addEventListener('click', customEventListener);
Please feel free to reopen this issue if this solution does not work for you. Thank you!
Braze Web SDK Version
4.0.5
Integration Method
NPM
Browser
Chrome
Steps To Reproduce
Hi guys. Sorry don't know where else to ask you this. We are integrating Content Cards. All well and good, only when it came to displaying an unread cards count we hit a roadblock..
I can get a count no problem with below code
I use
toggleContentCards()
method to show/hide drawer. I can resent unread count if user clicks same button to hide drawer.But, if they click
X
button within actual drawer, I have no way(or at least I can't find) to capture it and reset unread countExpected Behavior
We as devs are able to listen to something like
onClose
method to be able to reset count if user closes the drawer by the means of clicking theX
button within the drawer.Actual Incorrect Behavior
Unable to reset unread cards count if user dismisses the drawer by clicking the
X
Verbose Logs
No response
Additional Information
No response