Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/project/ProjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,9 +667,9 @@ define(function (require, exports, module) {
var $treenode = $(event.target).closest("li");
if ($treenode.is($(_projectTree.jstree("get_selected")))) {
// wrap this in a setTimeout function so that we can check if it's a double click.
_mouseupTimeoutId = window.setTimeout(function (event) {
// if we get a double-click,_mouseupTimeoutId will have been set to lull by the double-click handler before this runs.
if (_mouseupTimeoutId !== null) {
_mouseupTimeoutId = window.setTimeout(function () {
// if we get a double-click,_mouseupTimeoutId will have been set to lull by the double-click handler before this runs. Also double check to make sure it only happens on left mouse clicks.
if (_mouseupTimeoutId !== null && event.which === 1) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should test event.which at the very beginning of the mouseup handler (so we don't do any of this logic if the original click wasn't a left click).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, minor nit I just noticed: the comment above says _mouseupTimeoutId will have been set to lull. I think you meant lulz. Er, I mean null. (Also missing a space after the comma.)

CommandManager.execute(Commands.FILE_RENAME);
}
}, 500);
Expand Down