low-level DOM click and drag handler