Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Learn More

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

Contenteditable cannot click into

  • 4 risposte
  • 1 ha questo problema
  • 6 visualizzazioni
  • Ultima risposta di 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

Modificato da cor-el il

Tutte le risposte (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."