Browse Source

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

Fixes for summernote and build.js
version-14
Makarand Bauskar 8 years ago
committed by GitHub
parent
commit
aa7424618c
2 changed files with 3 additions and 3 deletions
  1. +0
    -1
      frappe/build.js
  2. +3
    -2
      frappe/public/js/frappe/form/control.js

+ 0
- 1
frappe/build.js View File

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


+ 3
- 2
frappe/public/js/frappe/form/control.js View File

@@ -1652,9 +1652,10 @@ frappe.ui.form.ControlTextEditor = frappe.ui.form.ControlCode.extend({
// firefox hack that puts the caret in the wrong position // firefox hack that puts the caret in the wrong position
// when div is empty. To fix, seed with a <br>. // when div is empty. To fix, seed with a <br>.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=550434 // 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); var $this = $(this);
$this.html( $this.html() + '<br>' );
$this.html($this.html() + '<br>');
}); });
}, },
onChange: function(value) { onChange: function(value) {


Loading…
Cancel
Save