Incompatible Markup Pointers Revisited

Last December I wrote about the Incompatible Markup Pointers exception in IE. I've been able to pinpoint the source of the exception more exactly: it occurs if you want to paste HTML into a TextRange, and the window the parent element of the TextRange belongs to does not have focus.

I've made two test cases, one where the window does not receive focus, and one where it does. Judge for yourself!

Modified: February 25th 2008
By: Mark Wubben

anonymous user
May 14th 2008
Hello, Mark.
Thank for your researching on this. May be following information would be interesting to you.
Currently I working on w5g editor in my company, and we got that exception when inserting emoticons in tinyMCE-based editor. We have tried to use same solution--focus on window before inserting--but still got this error.
Feel free to contact me at doctor.hogart[at]gmail dot com.
anonymous user
June 22nd 2010
Hi, his example didn't work for me too, despite the fact that the illustrated problem looks very like mine.

But I found another solution that worked for me. The problem is indeed a focus problem. The question is : what to focus ? In my case, I focused an existing textbox which is located above the iframe (outside). Then the pasteHTML into the iframe worked.