Cursor jumps straight to the "Definition" field

Re: Cursor jumps straight to the "Definition" field

by Timothy Takemoto -
Number of replies: 0

Dear Przemek
I am not sure if it really is true that the autolinks timeout if there is no "concept," but, being unable to check for empty "concept," like Przemek, I also wanted to change the focus so that the cursor starts in the concept field to encourage students to fill in a glosary item before submission.

Since I did not want my header in the edit page anyway, I got rid of the standard header and tried something like
echo "<bodyxxx\"document.forms.theform.concept.setfocus()\">";
I got this from the web. ("theform" is the name of the form and "concept" is the name of the first, concept/glossary item definition field. )

(BTW it is important to also include the javascript in the header, and this I did.).

However, while my hacked headerless glossary entry form works fine, it still seems that the focus (cursor position) jumps straight to the definition.  Even assuming that concept="" is checked and rejected, it would help if as Przmek says, to have the first focus in the "concept" field.

Perhaps this will not be the case with the new hmtlarea, and it is only richtextarea that grabs the focus by force?

BTW if anyone wants a simpliefied glossary entry form (without categories, links or not, care about caps or not, uploads, etc) then I will be happy to send my hack.
Timothy