浏览代码

HUE-7470 [editor] Only check for risks when a snippet has focus

Johan Ahlen 8 年之前
父节点
当前提交
66c75d2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

+ 1 - 1
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -1051,7 +1051,7 @@ var EditorViewModel = (function() {
       });
       });
 
 
       self.checkComplexity = function () {
       self.checkComplexity = function () {
-        if (lastCheckedComplexityStatement === self.statement()) {
+        if (!self.inFocus() || lastCheckedComplexityStatement === self.statement()) {
           return;
           return;
         }
         }