2013-07-03 1 views

답변

2

나는이 해결책을 아래 예제를 참조하십시오. 귀하의 의견은 무엇입니까?

<html> 
<body> 
<textarea cols=50 ondblclick="checkDblClick(event)">abc1space abc2space abc3space abc 
</textarea> 
<script> 


function checkDblClickDelayed(target) { 

    while (target.value.substr(target.selectionEnd -1, 1) == " ") { 
     target.selectionEnd = target.selectionEnd - 1; 
    } 
} 

function checkDblClick(e) { 
//we make a delay of 0ms to wait until the selection is in the final position 
    target = e.target; 
    setTimeout(function() 
      { 
     checkDblClickDelayed(target); 
     } 
     , 0); 
} 


</script> 

</body> 
</html> 
+0

훌륭한 작품! 감사! – kicaj

+0

필자의 경우 (vue.js) 두 번 클릭 한 후 '<1s'에 대한 화이트 스페이스가 깜박이지만 솔루션이 작동합니다! 많은 감사합니다! – user3479125

-1

대답은 ... 할 수 없습니다.

가장 가까운 것은 텍스트를 두 번 클릭 한 다음 Shift + 클릭하는 것입니다. 파이어 폭스에 대한에서

0

는 :에 대한 구성보기는 :

false로

설정을 layout.word_select.eat_space_to_next_word.