contentEditable and caret/focus problem

From: EilefH (anonymous_at_discussions.microsoft.com)
Date: 05/14/04


Date: Fri, 14 May 2004 06:16:07 -0700

I am hosting a WebBrowser contron in a .NET windows forms app for HTML editing capabilities.
The WebBrowser control "hosts" a very simple html page containing a DIV tag with the contentEditable attribute set to true, making it possible to edit and format the content of the tag.
My problem arises whenever I switch to another application or window and back. The webbrowser control seem to have lost focus, and there is no (visible) caret. However, when I hold down the shift key and start navigating using arrow keys, text is selected (!) in the editable content, typed text does not appear though. The same behavior can be experienced in the Microsoft Document Explorer (dexplore) for the contenteditable example in MSDN Library April 2004.

Oh, and I tried reproducing the same behavior opening the html page in Internet Explorer but to no avail. Internet Explorer works as expected (caret is shown).

Anyone?



Relevant Pages