浏览代码

Merge pull request #3421 from netchampfaris/fix-summernote-build

Fixes for summernote and build.js
version-14
Makarand Bauskar 8 年前
committed by GitHub
父节点
当前提交
aa7424618c
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. +0
    -1
      frappe/build.js
  2. +3
    -2
      frappe/public/js/frappe/form/control.js

+ 0
- 1
frappe/build.js 查看文件

@@ -272,7 +272,6 @@ function watch_js(ondirty) {
if (sources.includes(filename)) {
pack(target, sources);
ondirty && ondirty(target);
break;
}
}
});


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

@@ -1652,9 +1652,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) {


正在加载...
取消
保存