Patch Set 1:

> on Mac it seems if there is no selection the expected
> event isn't fired when right-clicking the text area

Yes, that would be expected. The event should only be fired whenever the selection changes.

Before attaching the next patch I have to figure out on a Mac what's going on.