Custom widget sends me back to index.html on completion

Hi I've created a custom widget but have an issue where once it's finished either by being successful and running a microflow or if there's an error and an error message is displayed, once the widget code has completed I'm redirected back to index.html instead of staying on the page where the widget is located. I can't see any reason for this to be happening, can anyone help? I've tried stripping the widget back so that all it does is display an error message when you click a button and still get the same behaviour. Thanks Paul
1 answers

I managed to figure it out, it's because we had form tags on the widget html template, taking them out stops the refresh