dirty check and confirm before leave blockly page