2015-01-16 4 views
0

WYSIHTML5 편집기에서 정렬되지 않은 목록을 추가 할 때 Google 크롬 브라우저의 편집 가능 영역에 초점을 맞추지 않습니다. 그러나 굵게, 기울임 꼴 등의 다른 옵션에 대해서는 정상적으로 작동합니다. 검색했지만이 버그에 대한 해결책을 찾을 수 없었습니다.크롬에 정렬되지 않은 목록을 삽입하는 동안 WYSIHTML5 편집기가 편집 가능 영역을 초점 맞추지 않음

composer.commands.exec("formatBlock", "div", tempClassName); 
    tempElement = doc.querySelector("." + tempClassName); 
    isEmpty = tempElement.innerHTML === "" || tempElement.innerHTML === wysihtml5.INVISIBLE_SPACE; 
    composer.selection.executeAndRestoreSimple(function() { 
     list = wysihtml5.dom.convertToList(tempElement, "ul"); 
    }); 
    if (isEmpty) { 
     composer.selection.selectNode(list.querySelector("li")); 
    } 

에 대한 WYSIHTML5 JS, 검색 라인 wysihtml5.commands.insertUnorderedList 추가 찾는

답변

0

및 댓글을 제거 조건 부분과 같은 :

composer.commands.exec("formatBlock", "div", tempClassName); 
     tempElement = doc.querySelector("." + tempClassName); 
     isEmpty = tempElement.innerHTML === "" || tempElement.innerHTML === wysihtml5.INVISIBLE_SPACE; 
     composer.selection.executeAndRestoreSimple(function() { 
      list = wysihtml5.dom.convertToList(tempElement, "ul"); 
     }); 
     //if (isEmpty) { 
      composer.selection.selectNode(list.querySelector("li")); 
     //} 

그것은 isEmpty = tempElement.innerHTML === "" || tempElement.innerHTML === wysihtml5.INVISIBLE_SPACE; 사실이 될 수 없다 조건 사촌 나를 위해 일한 정렬되지 않은 목록을 삽입하고 편집 가능 영역이 비어 있지 않기 때문에. 행운을 빕니다..!!