Skip to content

Commit

Permalink
fix: commandHandler history stack delete
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 committed Apr 22, 2019
1 parent e78b0b7 commit e20f68e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -1525,9 +1525,6 @@ export default function (context, plugins, lang) {
}

this.focus();

// history stack
this.history.push();
},

/**
Expand Down Expand Up @@ -1707,7 +1704,7 @@ export default function (context, plugins, lang) {
*/
const event = {
_directionKeyKeyCode: new RegExp('^(8|13|32|46|33|34|35|36|37|38|39|40|46|98|100|102|104)$'),
_keyCodeIgnoreRegExp: new RegExp('^(1[6-8]|20|3[3-9]|40|45|144|145)$'),
_historyIgnoreRegExp: new RegExp('^(9|1[6-8]|20|3[3-9]|40|45|9[1-3]|11[2-9]|12[0-3]|144|145)$'),
_changeButtonClassTagCheck: new RegExp('^(B|U|I|STRIKE|SUB|SUP)$'),
_keyCodeShortcut: {
66: 'B',
Expand Down Expand Up @@ -2219,7 +2216,7 @@ export default function (context, plugins, lang) {
if (userFunction.onKeyUp) userFunction.onKeyUp(e);

// history stack
if (!event._keyCodeIgnoreRegExp.test(keyCode)) {
if (!event._historyIgnoreRegExp.test(keyCode)) {
core.history.push();
}
},
Expand Down

0 comments on commit e20f68e

Please sign in to comment.