Community
Participate
Working Groups
STR: 1. open Orion. 2. make a selection or place the caret anywhere you want in the document. 3. right-click on a different line. Expected result: nothing happens. Actual result: the text color of the selection changes and the caret moves to the mouse location. Cause: the right click event is not prevented, the caret location changes and the DOM selection is lost (hence the text color of the selection changes). This is caused by Mozilla bug 709476: https://bugzilla.mozilla.org/show_bug.cgi?id=709476
Proposed change: https://github.com/mihaisucan/orion.client/tree/bug-366312 We can't use preventDefault(), so the only solution I came up with was to update the DOM selection when needed. Please let me know if further changes are needed. Thank you!
Looks fine, not sure I would worry about the "if (timeDiff <= this._clickTime)" test, go ahead and release it. Thank you
(In reply to comment #2) > Looks fine, not sure I would worry about the "if (timeDiff <= this._clickTime)" > test, > > go ahead and release it. Thank you for reviewing the code! Landed: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ea880f5922f1bcdf09fd5fa1e9d238355d36cf89 The timeDiff check is needed for when you right-click then you press the contextmenu key after some long delay. The workaround to call _updateDOMSelection() is only needed when the context menu is invoked from right-click within the allocated time.