Skip to content

Commit

Permalink
Fix(taBind): fix for bug under Firefox when delete all content #1217
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelParke committed Jul 10, 2016
1 parent f5e9bd4 commit 67e7ebe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/taBind.js
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,12 @@ angular.module('textAngular.taBind', ['textAngular.factories', 'textAngular.DOM'
}
}
var val = _compileHtml();
/* istanbul ignore next: FF specific bug fix */
if (val==='<br>') {
// on Firefox this comes back sometimes as <br> which is strange, so we remove this here
//console.log('*************BAD****');
val='';
}
if(_defaultVal !== '' && val.trim() === ''){
_setInnerHTML(_defaultVal);
taSelection.setSelectionToElementStart(element.children()[0]);
Expand Down

0 comments on commit 67e7ebe

Please sign in to comment.