Skip to content

Commit

Permalink
Added timeout in mouse handler
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnester committed May 29, 2022
1 parent f30cd47 commit 070addf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ace/mouse/mouse_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ var MouseHandler = function(editor) {
if (windowBlurred)
window.focus();
editor.focus();
// Without this editor is blurred after double click
setTimeout(function () {
if (!editor.isFocused()) editor.focus();
});
};

var mouseTarget = editor.renderer.getMouseEventTarget();
Expand Down Expand Up @@ -221,4 +225,4 @@ config.defineOptions(MouseHandler.prototype, "mouseHandler", {


exports.MouseHandler = MouseHandler;
});
});

0 comments on commit 070addf

Please sign in to comment.