Skip to content

Commit

Permalink
trap IE 11 removeAllRanges() exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Collins committed Aug 15, 2014
1 parent fb8b8a6 commit f78fcca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/mentio.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ angular.module('mentio')
range.setStart(elem, offset);
range.setEnd(elem, offset);
range.collapse(true);
sel.removeAllRanges();
try{sel.removeAllRanges();}catch(error){}
sel.addRange(range);
targetElement.focus();
}
Expand Down
Loading

0 comments on commit f78fcca

Please sign in to comment.