Răsfoiți Sursa

CDB: List are now closed if escape is pressed on the cell that contains the list

lviguier 5 luni în urmă
părinte
comite
fde0c0a615
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      hide/comp/cdb/Editor.hx

+ 4 - 0
hide/comp/cdb/Editor.hx

@@ -147,12 +147,16 @@ class Editor extends Component {
 		keys.register("cdb.closeList", function() {
 			var c = cursor.getCell();
 			var sub = Std.downcast(c == null ? cursor.table : c.table, SubTable);
+			if (sub == null)
+				sub = c.line.subTable != null && c.line.subTable.cell == c ? c.line.subTable : null;
+
 			if( sub != null ) {
 				sub.cell.elementHtml.click();
 				return;
 			}
 			if( cursor.selection != null ) {
 				cursor.selection = null;
+				cursor.addElementToSelection(c.table, c.line, c.columnIndex, c.line.index);
 				cursor.update();
 			}
 		});