Your charger has a significant amount of capacitance. The spark was the battery charging the capacitor