浏览代码

fixed error when using shift-tab

Gildas 5 年之前
父节点
当前提交
6b37ee4cde
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      extension/ui/content/content-ui-editor-web.js

+ 1 - 2
extension/ui/content/content-ui-editor-web.js

@@ -1202,7 +1202,7 @@ table {
 					let element = cuttingPath[cuttingPathIndex];
 					let nextElement = cuttingPath[cuttingPathIndex + delta];
 					if (nextElement) {
-						let pathIndex = cuttingPathIndex;
+						let pathIndex = cuttingPathIndex + delta;
 						while (
 							(delta == 1 &&
 								element.getBoundingClientRect().width >= nextElement.getBoundingClientRect().width &&
@@ -1216,7 +1216,6 @@ table {
 						if (nextElement && nextElement.classList) {
 							unhighlightCutElement();
 							cuttingPathIndex = pathIndex;
-							cuttingPathIndex += delta;
 							highlightCutElement(cuttingPath[cuttingPathIndex]);
 						}
 					}