Added pan gesture to close keyboard