Skip to content

Commit

Permalink
fix: 2.15.2 - figcaption exception in list
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 committed May 22, 2019
1 parent bf6e554 commit 87a0104
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/suneditor.min.js

Large diffs are not rendered by default.

11 changes: 4 additions & 7 deletions src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,6 @@ export default function (context, pluginCallButtons, plugins, lang) {
core.history.push();
}
}

break;
case 9: /** tab key */
e.preventDefault();
Expand All @@ -2467,7 +2466,6 @@ export default function (context, pluginCallButtons, plugins, lang) {
if (!moveCell) return false;

core.setRange(moveCell, 0, moveCell, 0);

break;
}

Expand Down Expand Up @@ -2496,7 +2494,6 @@ export default function (context, pluginCallButtons, plugins, lang) {

// history stack
core.history.push();

break;
case 13: /** enter key */
formatEl = util.getFormatElement(selectionNode);
Expand All @@ -2508,12 +2505,12 @@ export default function (context, pluginCallButtons, plugins, lang) {
const newEl = core.appendFormatTag(rangeEl, util.isCell(rangeEl.parentNode) ? 'DIV' : util.isListCell(formatEl) ? 'P' : null);
util.removeItemAllParents(formatEl);
core.setRange(newEl, 1, newEl, 1);

// history stack
core.history.push();
}
} else if (/^FIGCAPTION$/i.test(rangeEl.nodeName) && util.getParentElement(rangeEl, util.isList)) {
e.preventDefault();
formatEl = core.appendFormatTag(formatEl);
core.setRange(formatEl, 0, formatEl, 0);
}

break;
}

Expand Down

0 comments on commit 87a0104

Please sign in to comment.