Seems like the `if (_inClickCallback) _clickCounter++;` part should happen for any button (i.e. outside the event.which check).  Otherwise if you quickly right-click after selecting an item, it'll still go into rename mode.