Skip to content

Commit 67e7ebe

Browse files
committed
Fix(taBind): fix for bug under Firefox when delete all content #1217
1 parent f5e9bd4 commit 67e7ebe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/taBind.js

+6
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,12 @@ angular.module('textAngular.taBind', ['textAngular.factories', 'textAngular.DOM'
823823
}
824824
}
825825
var val = _compileHtml();
826+
/* istanbul ignore next: FF specific bug fix */
827+
if (val==='<br>') {
828+
// on Firefox this comes back sometimes as <br> which is strange, so we remove this here
829+
//console.log('*************BAD****');
830+
val='';
831+
}
826832
if(_defaultVal !== '' && val.trim() === ''){
827833
_setInnerHTML(_defaultVal);
828834
taSelection.setSelectionToElementStart(element.children()[0]);

0 commit comments

Comments
 (0)