don't click-edit code if in view mode or if a drag

fixes #407 and fixes #473, respectively