Fix for iframe
petko opened this issue · comments
petko commented
I've tried to use your plugin inside TinyMCE editor. Due to the following function it does not work, but it is easy to fix by changing both occurrences of env.window.document
to $obj[0].ownerDocument
here:
TinyMCE uses iframe for the elements in the editor, so they have different document object than the main one.
Louis Ameline commented
Hello, thanks for your message. So your tests show that it works with this modification?
It seems like a harmless change, this is doable.
Louis Ameline commented
I wonder what the ownerDocument for detached nodes is. null
maybe? If so the test needs to change slightly.
petko commented
I can't find any information about it, but null
sounds logical..