From 932ffa80fe52e12e2edf320e38f3a780d343325c Mon Sep 17 00:00:00 2001 From: tophf Date: Sat, 9 May 2015 23:40:49 +0300 Subject: [PATCH] Editor: use visible code box for 'find' when focused one is offscreen --- edit.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/edit.js b/edit.js index 58c24d41..84d14beb 100644 --- a/edit.js +++ b/edit.js @@ -548,6 +548,12 @@ function setupGlobalSearch() { } function find(activeCM) { + editors.lastActive = activeCM; + var cm = getEditorInSight(); + if (cm != activeCM) { + cm.focus(); + activeCM = cm; + } var originalOpenDialog = activeCM.openDialog; activeCM.openDialog = function(template, callback, options) { originalOpenDialog.call(activeCM, findTemplate, function(query) {