Commit 33ccf9a322b2093a341d74b316f16f9049c05d93

Authored by bichao.dong
1 parent d9202ae3

fix event bind error

Showing 1 changed file with 4 additions and 2 deletions
editer.html
... ... @@ -71,9 +71,11 @@
71 71 <script>
72 72 $(function() {
73 73 var selection, range;
74   - $('.editer').on('click, input', function(){
  74 + $('.editer').on('click input', function(){
75 75 selection = window.getSelection();
76   - range = selection.getRangeAt(0);//找到焦点位置
  76 + if(selection.getRangeAt){
  77 + range = selection.getRangeAt(0);//找到焦点位置
  78 + }
77 79 });
78 80 $('#upload_btn').on('change', function(target) {
79 81 target = $(this);
... ...