Two inflight engine shut downs in early 2020 have prompted Airbus and EASA to order changes to how liquids are consumed (or not) on the flight deck. A drink spilled on the center console of a Delta flight required a diversion, and an Asiana flight diverted after a similar spill.
Hydration is important, especially on X/C flights – but needless to say, spilled drinks into or onto any cockpit components can lead to both inflight issues, major clean-up/MX costs, and aircraft downtimes.
Please be mindful – only bring travel mugs or other containers that can be fully closed, and make sure passengers of yours do the same.
Non-carbonated water is still the best way stay hydrated on any flight.