The standard Custom Widget in the Web SDK is designed to close when a user clicks on the background overlay (outside the widget). There is no built-in configuration to disable this behavior in the standard template.
To achieve a persistent widget that does not close on background clicks, you must implement a Custom Subscription Widget. This allows you to fully control the HTML, CSS, and behavior of the subscription dialog.
To implement this: 1. Set customPopup: { enable: true } in your Pushwoosh initialization code. This disables the default widget behavior. 2. Create your own modal interface using custom HTML/JS. 3. Call Pushwoosh.push(['subscribe']); programmatically when the user clicks your custom "Allow" button.
Example configuration:
Pushwoosh.push(['init', {
// ... your other settings ...
customPopup: {
enable: true, // Disables the standard widget logic
// You can now render your own UI and trigger subscription manually
}
}]);
For full implementation details, please refer to the documentation on Custom Subscription Widgets.
Comments
0 comments
Please sign in to leave a comment.