Ariel Weinberger pushed to branch feature/visual-editing-psp2 at cms-community 
/ hippo-addon-channel-manager


Commits:
d1356ef8 by Ariel Weinberger at 2017-04-18T14:29:32+02:00
CHANNELMGR-1047 Fixed validation for required HTML rich text fields

- - - - -


2 changed files:

- 
frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.controller.js
- 
frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.html


Changes:

=====================================
frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.controller.js
=====================================
--- 
a/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.controller.js
+++ 
b/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.controller.js
@@ -22,6 +22,7 @@ class CKEditorController {
     this.$element = $element;
     this.CKEditorService = CKEditorService;
     this.ConfigService = ConfigService;
+    this.textAreaElement = $element.find('textarea');
   }
 
   $onInit() {
@@ -39,10 +40,12 @@ class CKEditorController {
       });
 
       this.editor.on('focus', () => {
+        this.textAreaElement.focus();
         this.$scope.$apply(() => this.onFocus());
       });
 
       this.editor.on('blur', () => {
+        this.textAreaElement.blur();
         this.$scope.$apply(() => this.onBlur());
       });
 


=====================================
frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.html
=====================================
--- 
a/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.html
+++ 
b/frontend-ng/src/angularjs/channel/sidePanels/rightSidePanel/fields/ckeditor/ckeditor.html
@@ -14,10 +14,9 @@
   limitations under the License.
   -->
 
-<textarea ng-model="$ctrl.model"
+<textarea ng-model="$ctrl.model.$modelValue"
           aria-label="{{ $ctrl.ariaLabel }}"
           ng-required="{{ $ctrl.isRequired }}"
           placeholder=""
           class="textarea-ckeditor"
-          md-no-resize>
-</textarea>
\ No newline at end of file
+          md-no-resize></textarea>



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/d1356ef87a67cfe4a580a46956ba32cb987b782e
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to