[Hi Notifications Popover] Bug identified and fixed
Forge component by Hi Interactive
Application Type

We identified a bug in Hi Notifications Popover, which we have resolved in our local version, but just wanted to let you know in case you want to update the component.

The issue we were finding was that in certain circumstances, the Notifications Popover would not close when you clicked outside of the Popover area, or if you clicked on a different Popover on the same screen.

This would only occur if the content of the Popover had certain features such as a button that performed actions when clicked.

The issue was that the Javascript Init function was being called multiple times, as it was set to run in the OnRender event of the block. The init function would clear the javascript variable previousParent, which would prevent it from being closed when clicking outside the Popover later. Any screen activity within the Popover content that caused a re-render would cause this to occur.

The solution was to either:
a) Move the initialise function to the OnReady event of the block, so that it was only called once

b) Put conditional logic around the initalise function in OnRender, so that it would not reinitialise if it had already done so. We used a local variable to save the NotificationWidgetId for this purpose.

Happy to share our fix if you come across this issue, or if Hi Interactive want to incorporate it into a future version.

It's a very good component, and pleased to have found it on the Forge.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.