Browse Source

CDB: Escape is now closing list BEFORE closing filters

lviguier 5 months ago
parent
commit
c4cb53ad74
1 changed files with 3 additions and 1 deletions
  1. 3 1
      hide/comp/cdb/Editor.hx

+ 3 - 1
hide/comp/cdb/Editor.hx

@@ -261,7 +261,9 @@ class Editor extends Component {
 		case K.SPACE:
 			e.preventDefault(); // prevent scroll
 		case K.ESCAPE:
-			if (!isRepeat && searchBox != null && searchBox.is(":visible")) {
+			var c = cursor.getCell();
+			var sub = Std.downcast(c == null ? cursor.table : c.table, SubTable); // Prevent closing search filter befor closing list
+			if (sub == null && !isRepeat && searchBox != null && searchBox.is(":visible")) {
 				searchBox.find(".close-search").click();
 				return true;
 			}