Merge pull request #782 from erikvold/839872

Fix Bug 839872: context-menu does not emit click event onCommand r=@Mossop(cherry picked from commit 54795f46db436087cee0fc1e5e91d27050b5153a)
(cherry picked from commit 5e1dc2e6a2ae53bc39ad7687b880cbe01c2b1351)