bugfix: prevent default action when save or close button is clicked