Unable to set focus on HTC div element
Posted on 2004-04-01
I have a HTC component being instantiated in parent.asp. The HTC has an editable DIV (myDIV.contentEditable = "True") and some buttons that formats the selected text inside the DIV element (Bold, Italic, Underline).
Once the page is loaded, the innerHTML of the editable DIV has a default value which consists of several paragraphs. Some are left-aligned and some are right-aligned (do this when recreating the problem). The first time I select text inside the div tag, no problem occurs. But when I set the focus on a textbox in the parent.asp, then, go back to the editable DIV to select some texts, nothing happens; it is as if the editable DIV is disabled. :(
Has anyone encountered this before? What can be done in the HTC file for this to work properly?