Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

Learn More

Contenteditable cannot click into

  • 4 답장
  • 1 이 문제를 만남
  • 6 보기
  • 최종 답변자: Col_Boogie

more options

I have code : <td>&spades;<span contenteditable="true" id='NS'></span> I can tab into the span field, but if I click on it I cannot edit it. Problem goes away if there is something in the field

I have code : &lt;td&gt;&amp;spades;&lt;span contenteditable="true" id='NS'&gt;&lt;/span&gt; I can tab into the span field, but if I click on it I cannot edit it. Problem goes away if there is something in the field

글쓴이 cor-el 수정일시

모든 댓글 (4)

more options

Col_Boogie said

<td>♠<span contenteditable="true" id='NS'></span>

Should it be possible to move the cursor into an empty span if the containing element is not contenteditable? Hmm, that isn't mentioned here:

https://developer.mozilla.org/docs/Web/API/HTMLElement/contentEditable

If Firefox isn't following web standards, that would be a good argument for fixing it. Otherwise, it would probably considered an optional fix.

What does Chrome do?

more options

Checked Chrome: If I click just after the card suit, it works. Also note that for Firefox, if I click just before the suit, I can then tab to the editable field. I tried adding: span {spellcheck="false"; min-width:3em} no help. Note the spellcheck="false"; is ignored. I have to right click screen to turn it off.

more options

spellcheck="false" would be an attribute like contenteditable="true" and thus not part of a style rule.

more options

Sorry, you are right about spellcheck. Sometimes I wish there were HTML style-attribute rules. Would save a lot of coding. Maybe <HTML-attributes> ... </HTML-attributes> and <... style="...; HTML: attribute1, attribute2, etc."