ユーザーがテキストの段落をクリックすると、テキストエリアがそれを置き換えるインラインテキストエリアを作成しようとしています。
すべて順調ですが、その領域でテキストを選択/強調表示しようとすると、textareaが表示されます。
Trelloでは、これを回避することができます。
私のHTMLは次のとおりです。
<h2>Your Notes</h2>
<span id="notes_area" style="display: block;" data-entry-id="<%= @entry.id %>" title="Click to edit your notes.">
<p><%= @entry.notes.present? ? "#{@entry.notes}" : "You have not added any notes for this episode." %></p>
</span>
そして、私のCoffeeScriptは次のとおりです(多くの切り抜きがあります):
$("#notes_area").bind "mouseup", ->
display_inline_note_form()
display_inline_note_form = ->
# code goes here...
これは解決された問題だと思いますが、Web上で何も見つからないようです。
ありがとう