kogmbh/WebODF — pull request #483 by peitschie (2014-03-24 08:59:41+00:00)
Title: Improve right-click behaviour near and around images

In Chrome, right-clicking repeatedly generates both a contextmenu AND a mouseup event for subsequent clicks. E.g. a sequence of right clicks generates:
1st - mousedown, contextmenu
2nd...nth - mousedown, contextmenu, mouseup

This causes problems when clicking on images as the selection is immediately reset after being processed by the first context menu, causing the subsequent mouseup event to try and reset the cursor
selection *again*.

In addition, on OSX, right-clicking on an image at the end of a range selection will hit this particular branch. The image should remain selected if the right-click occurs on top of it as technically it's the same behaviour as right clicking on an existing text selection.