浏览代码

Fix multiline paste going below the selection

Leonardo Jeanteur 3 年之前
父节点
当前提交
5682ead8db
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      hide/comp/cdb/Editor.hx
  2. 2 2
      hide/comp/cdb/Table.hx

+ 2 - 2
hide/comp/cdb/Editor.hx

@@ -390,8 +390,8 @@ class Editor extends Component {
 				Reflect.setField(destObj, destCol.name, v);
 		}
 
-		var posX = cursor.x < 0 ? 0 : cursor.x;
-		var posY = cursor.y < 0 ? 0 : cursor.y;
+		var posX = x1 < 0 ? 0 : x1;
+		var posY = y1 < 0 ? 0 : y1;
 		var data = clipboard.data;
 		if( data.length == 0 )
 			return;

+ 2 - 2
hide/comp/cdb/Table.hx

@@ -203,7 +203,7 @@ class Table extends Component {
 			else
 				line.create();
 			if( lastSepTitle != null )
-				line.element.addClass("group-" + lastSepTitle.toLowerCase());
+				line.element.addClass("group-" + StringTools.replace(lastSepTitle.toLowerCase(), " ", "-"));
 			tbody.append(line.element);
 		}
 		element.append(tbody);
@@ -234,7 +234,7 @@ class Table extends Component {
 		var toggle = sep.find("a");
 		var title = if( sheet.props.separatorTitles != null ) sheet.props.separatorTitles[sindex] else null;
 		if( title != null )
-			sep.addClass('separator-$title'.toLowerCase());
+			sep.addClass(StringTools.replace('separator-$title'.toLowerCase(), " ", "-"));
 
 		function getLines() {
 			var snext = 0, sref = -1;