A new way to deal with single click, double click and drag