Add listener and handler for contextmenu event
Merge pull request #5114 from lkcampbell/fix-issue-4693

Fix issue #4693: Tree context menu behaves unpredictably while naming new file