Bug 376508 - Weird caret behaviour when right clicking
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js b/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
index 54c1453..a553c6c 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
@@ -1595,14 +1595,11 @@
 		},
 		_handleContextMenu: function (e) {
 			if (!e) { e = window.event; }
-			if (isFirefox && this._lastMouseButton === 3) {
+			if (isIE && this._lastMouseButton === 3) {
 				// We need to update the DOM selection, because on
 				// right-click the caret moves to the mouse location.
-				// See bug 366312.
-				var timeDiff = e.timeStamp - this._lastMouseTime;
-				if (timeDiff <= this._clickTime) {
-					this._updateDOMSelection();
-				}
+				// See bug 366312 and 376508.
+				this._updateDOMSelection();
 			}
 			if (this.isListening("ContextMenu")) {
 				var evt = this._createMouseEvent("ContextMenu", e);
@@ -1989,6 +1986,12 @@
 					e.preventDefault();
 				}
 			}
+			if (isFirefox && this._lastMouseButton === 3) {
+				// We need to update the DOM selection, because on
+				// right-click the caret moves to the mouse location.
+				// See bug 366312 and 376508.
+				this._updateDOMSelection();
+			}
 		},
 		_handleMouseOver: function (e) {
 			if (!e) { e = window.event; }