Close a template popup after saving model

This issue is on all of my pages that use template fields on a field editor. 

Popup editor does not close when clicking the “Done” button or the X on the top right after saving the model.

Steps to Reproduce:
Edit any field in the model. Save the model. Click to edit a template field. Click Done or the X on the popup. The popup does not close.

Refresh the page, and lose any changes made.

Potentially related:
After page refresh, edit the template field in the popup. Close the popup. Save the model. The field still shows in italics despite saving. Click to edit the template again, face same problem as above and cannot close the popup. However, the first change made before the save is kept. Anything after the first save is not kept on page refresh. 

Thanks Craig.  There have been a series of issues with template popups that we are working on.  I’ll add your test cases to our effort and ensure they are corrected. 

I appreciate your detailed bug report.