Community
Participate
Working Groups
In Scratchpad (and soon in the Style Editor) we have a context menu that shows the common Edit menu items (cut/copy/paste/delete/etc). STR: 1. Download a Firefox nightly, open Scratchpad. 2. Select some text and right-click. Expected result: you get the Cut, Copy and Delete menu items enabled. Paste should also be enabled if you currently hold some text in the clipboard. The actual result is that only Copy is enabled. This happens because the handleBodyMouseDown() function toggles the contentEditable boolean on the clientDiv, only on Firefox. The result is that our platform code is confused during the contextmenu event handling: it can't determine if the element the user right-clicked on is editable or not. The fix is to add e.which !== 3 to the if condition.
Proposed fix: https://github.com/mihaisucan/orion.client/tree/bug-370584 Please review and let me know if this fix is acceptable. Thank you! This fixes a regression that first showed up in commit 925b8b8408973c9329f324dfef22c697ff505ddc (according to git blame).
looks good to me
Thank you Felipe! I will land the patch!
(In reply to comment #3) > Thank you Felipe! I will land the patch! I just reviewed the code one more time. I believe, for consistency sake, the _handleBodyMouseUp() should have the same check. Agreed ? If so, please include this change too. Other suggestion is 'e.which === 1' instead of 'e.which !== 3' What do you think ? Thank you!
Felipe, that sounds good! Landed: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=137d5a8e9bbc0fa204caae74ebd25a7d9d4729bd Thank you!