Skip to content

Commit

Permalink
fix: optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 committed Aug 19, 2018
1 parent e1e4e2a commit e4647a3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/suneditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1661,10 +1661,7 @@ SUNEDITOR.defaultLang = {

/** Dialog, Submenu */
if (display) {
const prevSubmenu = editor.submenu;
editor.submenuOff();

if (/submenu/.test(display) && (target.nextElementSibling === null || target.nextElementSibling !== prevSubmenu)) {
if (/submenu/.test(display) && (target.nextElementSibling === null || target.nextElementSibling !== editor.submenu)) {
editor.callModule('submenu', command, target, function () {
editor.submenuOn(target);
});
Expand Down
4 changes: 2 additions & 2 deletions src/suneditor.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e4647a3

Please sign in to comment.