widgets not work

I put a customer widget into page, and worked when the page first open or reload the page. for example: 1.run locally, open a popup page with the widget, and the widget worked 2.close the page, an reopen the page, the widget not work. 3.reload whole page, and open the popup page again, and the widget worked again. what happened and what i need to do? thanks.
1 answers

Which widget are you using and is your wrapping entity persisting or nonpersisting?