浏览代码

Fix summernote ul/ol issue

version-14
Faris Ansari 8 年前
父节点
当前提交
07ce1c94d6
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. +3
    -2
      frappe/public/js/frappe/form/control.js

+ 3
- 2
frappe/public/js/frappe/form/control.js 查看文件

@@ -1651,9 +1651,10 @@ frappe.ui.form.ControlTextEditor = frappe.ui.form.ControlCode.extend({
// firefox hack that puts the caret in the wrong position
// when div is empty. To fix, seed with a <br>.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=550434
$(".note-editable[contenteditable='true']").on('focus', function(){
// this function is executed only once
$(".note-editable[contenteditable='true']").one('focus', function() {
var $this = $(this);
$this.html( $this.html() + '<br>' );
$this.html($this.html() + '<br>' );
});
},
onChange: function(value) {


正在加载...
取消
保存