From 07ce1c94d6211a629b8ac1ed29449d092c82ce7c Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 2 Jun 2017 15:49:25 +0530 Subject: [PATCH 1/3] Fix summernote ul/ol issue --- frappe/public/js/frappe/form/control.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frappe/public/js/frappe/form/control.js b/frappe/public/js/frappe/form/control.js index a6981d437a..d95d2fe0e4 100755 --- a/frappe/public/js/frappe/form/control.js +++ b/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
. // 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() + '
' ); + $this.html($this.html() + '
' ); }); }, onChange: function(value) { From 324ec411c496ad2f1c5af2cca488f546a1aac308 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Fri, 2 Jun 2017 15:50:33 +0530 Subject: [PATCH 2/3] Fix build.js A single JS file can be bundled in multiple output JS files, so removed `break` in the loop. --- frappe/build.js | 1 - 1 file changed, 1 deletion(-) diff --git a/frappe/build.js b/frappe/build.js index 1caaa0fcb3..ee153c3d18 100644 --- a/frappe/build.js +++ b/frappe/build.js @@ -272,7 +272,6 @@ function watch_js(ondirty) { if (sources.includes(filename)) { pack(target, sources); ondirty && ondirty(target); - break; } } }); From 26164e2ee4ae11bda5fc30c0c8624e589b4ef847 Mon Sep 17 00:00:00 2001 From: Faris Ansari Date: Mon, 5 Jun 2017 11:35:17 +0530 Subject: [PATCH 3/3] minor --- frappe/public/js/frappe/form/control.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/form/control.js b/frappe/public/js/frappe/form/control.js index d95d2fe0e4..88408abf15 100755 --- a/frappe/public/js/frappe/form/control.js +++ b/frappe/public/js/frappe/form/control.js @@ -1654,7 +1654,7 @@ frappe.ui.form.ControlTextEditor = frappe.ui.form.ControlCode.extend({ // this function is executed only once $(".note-editable[contenteditable='true']").one('focus', function() { var $this = $(this); - $this.html($this.html() + '
' ); + $this.html($this.html() + '
'); }); }, onChange: function(value) {