ECMS-4961 fix js error problem when choosing 'Cancel' in other views than FileView