Simplified code for disabling click-drag