Thanks, after further investigation it looks like calling the save function on the editor and then calling the hide function was causing the underlying problem.
On my main project I was also using 'destroy' on the close action on the editor which was also causing the problem.
Thanks for the assistance.