From 3b73d80590bff537e767f2c6b4c3fe00444f58e7 Mon Sep 17 00:00:00 2001 From: Andrey Fedosenko Date: Tue, 4 Oct 2016 17:51:56 +0300 Subject: [PATCH] IE11 changes fixes --- angular-contenteditable.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/angular-contenteditable.js b/angular-contenteditable.js index 944409a..e21ea48 100644 --- a/angular-contenteditable.js +++ b/angular-contenteditable.js @@ -28,7 +28,7 @@ angular.module('contenteditable', []) }) // view -> model - element.bind('input', function(e) { + element.bind('blur keyup change', function(e) { scope.$apply(function() { var html, html2, rerender html = element.html() @@ -51,14 +51,14 @@ angular.module('contenteditable', []) if (rerender) { ngModel.$render() } - if (html === '') { - // the cursor disappears if the contents is empty - // so we need to refocus - $timeout(function(){ - element[0].blur() - element[0].focus() - }) - } + //if (html === '') { + // // the cursor disappears if the contents is empty + // // so we need to refocus + // $timeout(function(){ + // element[0].blur() + // element[0].focus() + // }) + //} }) })