troubleshooting Question

Unable to set focus on HTC div element

Avatar of killer5
killer5 asked on
Web Languages and StandardsWeb Development
5 Comments1 Solution957 ViewsLast Modified:

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?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros