Repository: vscode
Issue: Firefox: Files in menu items (such as explorer) are opened on mouseup, not onclick
Labels: bug,help wanted,list-widget,web,firefox

Hi!

When I select a line in the editor I often start my selection from the end of the line, pressing the mouse left button and go to the beginning of the line and release the mouse button. However I go further than the beginning of the line to be quick and my cursor is on the left panel (ex: Explorer).

When I release the mouse button this triggers a mouseup event in the panel, for example an extension, which causes it to open in the editor (thus switching the active file being edited).

Example with this code:

```js
/**
 * @class mynamespace.Component class
 */
mynamespace.Component = function () {
	
};

/**
 * Fires a <i>onComponentTitleChanged</i> event on all registered listeners.
 * @private
 */
mynamespace.Component.prototype._fireTitleChanged = function () {
	this._listeners.forEach(l => {
		if (l.onComponentTitleChanged) {
			l.onComponentTitleChanged(this, this._title);
		}
	});
};

/**
 * Fires a <i>onComponentIconChanged</i> event on all registered listeners.
 * @private
 */
mynamespace.Component.prototype._fireIconChanged = function () {
	this._listeners.forEach(l => {
		if (l.onComponentIconChanged) {
			l.onComponentIconChanged(this, this._icon);
		}
	});
};

/**
 * Fires a <i>onComponentResized</i> event on all registered listeners.
 * @private
 */
mynamespace.Component.prototype._fireResized = function () {
	this._listeners.forEach(l => {
		if (l.onComponentResized) {
			l.onComponentResized(this);
		}
	});
};

/**
 * Fires a <i>onComponentMinimized</i> event on all registered listeners.
 * @private
 */
mynamespace.Component.prototype._fireMinimized = function () {
	this._listeners.forEach(l => {
		if (l.onComponentMinimized) {
			l.onComponentMinimized(this, this._isMinimized);
		}
	});
};

/**
 * Fires a <i>onComponentMaximized</i> event on all registered listeners.
 * @private
 */
mynamespace.Component.prototype._fireMaximized = function () {
	this._listeners.forEach(l => {
		if (l.onComponentMaximized) {
			l.onComponentMaximized(this, this._isMaximized);
		}
	});
};

/**
 * Fires a <i>onComponentClosed</i> event on all registered listeners.
 * @private
 */
mynamespace.Component.prototype._fireClosed = function () {
	for (var i = this._listeners.length - 1; i >= 0; --i) {
		var l = this._listeners[i];
		if (l.onComponentClosed) {
			l.onComponentClosed(this);
		}
	}
};
```

See this gif: I select some code then release the mouse button over the "Jupyter" item in the extensions panel, which opens it on the right side.

![bug-vscode](https://user-images.githubusercontent.com/3419050/234320798-630de459-de29-44e5-b57b-c28192a5b12a.gif)

This only happens in vscode.dev (or other web versions of it), not the desktop vscode app.


(Initially opened in https://github.com/gitpod-io/gitpod/issues/10559)

Version: 1.77.3
Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0
Embedder: vscode.dev

<!-- generated by web issue reporter -->