Skip to content

Commit

Permalink
prevent to initialize 2 editors on IE 10 and IE 11
Browse files Browse the repository at this point in the history
related with #98 and #103
  • Loading branch information
outsideris committed Jan 18, 2016
1 parent bf5e011 commit e26fdb7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/angular-summernote.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ angular.module('summernote', [])
};

callbacks.onChange = function(contents) {
if (element.summernote('isEmpty')) { contents = ''; }
updateNgModel();
$timeout(function() {
if (element.summernote('isEmpty')) { contents = ''; }
updateNgModel();
}, 0);
$scope.change({contents:contents, editable: $scope.editable});
};
callbacks.onBlur = function(evt) {
Expand Down

0 comments on commit e26fdb7

Please sign in to comment.