If you run the linked test in a debug build we assert when you select text, in a release build we crash. The problem is that the SVG text selection machinery runs even when in a foreignObject, when all events should be handed off to foreignObject the moment the reach it :-/ Given one of the main reasons for foreignObject is to allow flowing html text, etc this is critical to its support. We should also check the behaviour of mixed content xhtml/xml to ensure correctness. <rdar://5628970>
Ah, this looks to be a bug in mixed mode documents, rather than in foreignObject
Nope, on second thoughts that's not the case. This confuses me.
I don't see an ASSERT or crash on TOT Debug. I only see the text disappearing during selection (which is still wrong!).
The bug I describe of the disappearing text is probably just bug 16318.
Closing as WorksForMe, bug 16318 covers the redraw issues (which I think are somewhat understood now).