calebjacob / tooltipster

A jQuery tooltip plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix for iframe

petko opened this issue · comments

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:

https://github.com/iamceege/tooltipster/blob/f818f589de54165209756aa3319f49f841d708a2/src/js/tooltipster.js#L3286-L3291

TinyMCE uses iframe for the elements in the editor, so they have different document object than the main one.

Hello, thanks for your message. So your tests show that it works with this modification?
It seems like a harmless change, this is doable.

I wonder what the ownerDocument for detached nodes is. null maybe? If so the test needs to change slightly.

commented

I can't find any information about it, but null sounds logical..