Fixed dispatching cancel event on Cancel button