Skip to content

Commit

Permalink
2.33.3
Browse files Browse the repository at this point in the history
  • Loading branch information
JiHong88 authored Sep 18, 2020
2 parents 4621d9b + b3e0617 commit 3498ed2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "suneditor",
"version": "2.33.2",
"version": "2.33.3",
"description": "Pure JavaScript based WYSIWYG web editor",
"main": "src/suneditor.js",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions dist/suneditor.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"sideEffects": [
"./src/assets/css/*.css"
],
"version": "2.33.2",
"version": "2.33.3",
"description": "Pure JavaScript based WYSIWYG web editor",
"main": "src/suneditor.js",
"keywords": [
Expand Down
10 changes: 5 additions & 5 deletions src/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ const util = {
* @returns {Boolean}
*/
isTextStyleElement: function (element) {
return element && element.nodeType === 1 && /^(strong|span|font|b|var|i|em|u|ins|s|strike|del|sub|sup|mark|a|label|code)$/i.test(element.nodeName);
return element && element.nodeType !== 3 && /^(strong|span|font|b|var|i|em|u|ins|s|strike|del|sub|sup|mark|a|label|code)$/i.test(element.nodeName);
},

/**
Expand Down Expand Up @@ -1591,7 +1591,7 @@ const util = {
* @private
*/
_isIgnoreNodeChange: function (element) {
return element && element.nodeType === 1 && (this.isNonEditable(element) || !this.isTextStyleElement(element));
return element && element.nodeType !== 3 && (this.isNonEditable(element) || !this.isTextStyleElement(element));
},

/**
Expand All @@ -1601,7 +1601,7 @@ const util = {
* @private
*/
_isMaintainedNode: function (element) {
return element && element.nodeType === 1 && /^(a|label|code)$/i.test(typeof element === 'string' ? element : element.nodeName);
return element && element.nodeType !== 3 && /^(a|label|code)$/i.test(typeof element === 'string' ? element : element.nodeName);
},

/**
Expand All @@ -1611,7 +1611,7 @@ const util = {
* @private
*/
_isSizeNode: function (element) {
return element && element.nodeType === 1 && this.isTextStyleElement(element) && !!element.style.fontSize;
return element && element.nodeType !== 3 && this.isTextStyleElement(element) && !!element.style.fontSize;
},

/**
Expand All @@ -1621,7 +1621,7 @@ const util = {
* @private
*/
_notTextNode: function (element) {
return element.nodeType === 1 && (this.isComponent(element) || /^(br|input|select|canvas|img|iframe|audio|video)$/i.test(typeof element === 'string' ? element : element.nodeName));
return element && element.nodeType !== 3 && (this.isComponent(element) || /^(br|input|select|canvas|img|iframe|audio|video)$/i.test(typeof element === 'string' ? element : element.nodeName));
},

/**
Expand Down

0 comments on commit 3498ed2

Please sign in to comment.