Skip to content

Commit

Permalink
fix: [Chrome] 在 Chrome 上添加标题之后换行 JS 报错
Browse files Browse the repository at this point in the history
  • Loading branch information
longhao.llh committed Mar 7, 2019
1 parent a0daa90 commit 6e2d34e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 43 deletions.
7 changes: 3 additions & 4 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
#
#######################################################################

ver 4.1.13
* 改善:修改服务端代码的后缀名,避免直接上传到服务器后出现安全漏洞。

ver 4.1.12
ver 4.1.12 (2019-03-07)
* Bugfix:使用 use strict 时 JS 报错。
* Bugfix:自动高度的时候,全屏模式下还是执行自动高度。
* Bugfix:字体包含空格时切换代码模式,字体变成 "。
* Bugfix:[Chrome] 在 Chrome 上添加标题之后换行 JS 报错。
* 改善:修改服务端代码的后缀名,避免直接上传到服务器后出现安全漏洞。

ver 4.1.11 (2016-03-31)
* 新增: 俄语语言包,感谢Valery Votintsev (http://codersclub.org/)。
Expand Down
14 changes: 7 additions & 7 deletions kindeditor-all-min.js

Large diffs are not rendered by default.

20 changes: 3 additions & 17 deletions kindeditor-all.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*******************************************************************************
* KindEditor - WYSIWYG HTML Editor for Internet
* Copyright (C) 2006-2017 kindsoft.net
* Copyright (C) 2006-2019 kindsoft.net
*
* @author Roddy <[email protected]>
* @website http://www.kindsoft.net/
* @licence http://www.kindsoft.net/license.php
* @version 4.1.12 (2017-04-12)
* @version 4.1.12 (2019-03-07)
*******************************************************************************/
(function (window, undefined) {
if (window.KindEditor) {
Expand All @@ -19,7 +19,7 @@ if (!window.console) {
if (!console.log) {
console.log = function () {};
}
var _VERSION = '4.1.12 (2017-04-12)',
var _VERSION = '4.1.12 (2019-03-07)',
_ua = navigator.userAgent.toLowerCase(),
_IE = _ua.indexOf('msie') > -1 && _ua.indexOf('opera') == -1,
_NEWIE = _ua.indexOf('msie') == -1 && _ua.indexOf('trident') > -1,
Expand Down Expand Up @@ -4728,20 +4728,6 @@ function _bindNewlineEvent() {
if (!pSkipTagMap[tagName]) {
_nativeCommand(doc, 'formatblock', '<p>');
}
var div = self.cmd.commonAncestor('div');
if (div) {
var p = K('<p></p>'),
child = div[0].firstChild;
while (child) {
var next = child.nextSibling;
p.append(child);
child = next;
}
div.before(p);
div.remove();
self.cmd.range.selectNodeContents(p[0]);
self.cmd.select();
}
});
}
function _bindTabEvent() {
Expand Down
15 changes: 0 additions & 15 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,21 +211,6 @@ function _bindNewlineEvent() {
if (!pSkipTagMap[tagName]) {
_nativeCommand(doc, 'formatblock', '<p>');
}
// [WEBKIT] 将DIV改成P
var div = self.cmd.commonAncestor('div');
if (div) {
var p = K('<p></p>'),
child = div[0].firstChild;
while (child) {
var next = child.nextSibling;
p.append(child);
child = next;
}
div.before(p);
div.remove();
self.cmd.range.selectNodeContents(p[0]);
self.cmd.select();
}
});
}

Expand Down

0 comments on commit 6e2d34e

Please sign in to comment.