Skip to content
This repository was archived by the owner on Mar 29, 2025. It is now read-only.

Commit 6e2d34e

Browse files
author
longhao.llh
committed
fix: [Chrome] 在 Chrome 上添加标题之后换行 JS 报错
1 parent a0daa90 commit 6e2d34e

File tree

4 files changed

+13
-43
lines changed

4 files changed

+13
-43
lines changed

changelog.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
#
55
#######################################################################
66

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

1514
ver 4.1.11 (2016-03-31)
1615
* 新增: 俄语语言包,感谢Valery Votintsev (http://codersclub.org/)。

kindeditor-all-min.js

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kindeditor-all.js

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/*******************************************************************************
22
* KindEditor - WYSIWYG HTML Editor for Internet
3-
* Copyright (C) 2006-2017 kindsoft.net
3+
* Copyright (C) 2006-2019 kindsoft.net
44
*
55
* @author Roddy <luolonghao@gmail.com>
66
* @website http://www.kindsoft.net/
77
* @licence http://www.kindsoft.net/license.php
8-
* @version 4.1.12 (2017-04-12)
8+
* @version 4.1.12 (2019-03-07)
99
*******************************************************************************/
1010
(function (window, undefined) {
1111
if (window.KindEditor) {
@@ -19,7 +19,7 @@ if (!window.console) {
1919
if (!console.log) {
2020
console.log = function () {};
2121
}
22-
var _VERSION = '4.1.12 (2017-04-12)',
22+
var _VERSION = '4.1.12 (2019-03-07)',
2323
_ua = navigator.userAgent.toLowerCase(),
2424
_IE = _ua.indexOf('msie') > -1 && _ua.indexOf('opera') == -1,
2525
_NEWIE = _ua.indexOf('msie') == -1 && _ua.indexOf('trident') > -1,
@@ -4728,20 +4728,6 @@ function _bindNewlineEvent() {
47284728
if (!pSkipTagMap[tagName]) {
47294729
_nativeCommand(doc, 'formatblock', '<p>');
47304730
}
4731-
var div = self.cmd.commonAncestor('div');
4732-
if (div) {
4733-
var p = K('<p></p>'),
4734-
child = div[0].firstChild;
4735-
while (child) {
4736-
var next = child.nextSibling;
4737-
p.append(child);
4738-
child = next;
4739-
}
4740-
div.before(p);
4741-
div.remove();
4742-
self.cmd.range.selectNodeContents(p[0]);
4743-
self.cmd.select();
4744-
}
47454731
});
47464732
}
47474733
function _bindTabEvent() {

src/main.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -211,21 +211,6 @@ function _bindNewlineEvent() {
211211
if (!pSkipTagMap[tagName]) {
212212
_nativeCommand(doc, 'formatblock', '<p>');
213213
}
214-
// [WEBKIT] 将DIV改成P
215-
var div = self.cmd.commonAncestor('div');
216-
if (div) {
217-
var p = K('<p></p>'),
218-
child = div[0].firstChild;
219-
while (child) {
220-
var next = child.nextSibling;
221-
p.append(child);
222-
child = next;
223-
}
224-
div.before(p);
225-
div.remove();
226-
self.cmd.range.selectNodeContents(p[0]);
227-
self.cmd.select();
228-
}
229214
});
230215
}
231216

0 commit comments

Comments
 (0)