2017-05-05 3 views

답변

0

textarea는 div 태그 인 것처럼 보이고 div 태그는 tabindex 속성이 -1로 설정되어 있으면 집중 될 수 있습니다. 이

$(".emoji-wysiwyg-editor").attr("tabindex",-1).focus(); 
+0

시도했지만 작동하지 않습니다. – Andreah

-1

편집기 모두 jquery.emojiarea.js에서 .focus()EmojiArea_WYSIWYG이 때에 프로퍼티 hasFocus=True이 있어야합니다 있어야한다보십시오.

0

어쩌면 조금 늦게,하지만 나를 위해 다음 그것을했다 :

// Mousedown on #sendBtn submits message 
    $('#sendBtn').mousedown(function (editor) { 

     $('#sendBtn').click(); 
     // clear textArea after mousedown on #sendBtn 
     $('#chatTextarea').data("emojioneArea").setText(''); 

     // keep focus on editor after mousedown on #sendBtn 
     setTimeout(function() { 
      $("#emojioneArea").data("emojioneArea").editor.focus(); 
     }, 1) 
    }); 

에서는 setTimeout 없이는 작동하지 않았다. 왜 나 한테 묻지 마. ;)

관련 문제