Drupal.wysiwyg.activeId returns the latest focused editor.

But when clicking a button without having focus in it does not change the active editor. So if you have 2 editors, and you focused #1, and then click on the button in editor #2, the dialog will be wrongly placed in the editor #1.

Use the passed instanceId instead.

Comments

deciphered’s picture

Hi jide,

I will have to test this out (which I already should have), I had made the logical assumption that when clicking on a WYSIWYG module plugin, WYSIWYG module would focus on the WYSIWYG that you clicked the plugin on.... If that is not the case, it really should be.

Will do some testing and get back to you.
Thanks in advance for the patch.

Cheers,
Deciphered.

jide’s picture

Hi Deciphered,

I made the same assumption some time ago for a module I made (wysiwyg_cleaner) and realized this. The patch is pretty straightforward, so it should not bring any problem.

jide’s picture

StatusFileSize
new2.69 KB

Rerolled the patch against 1.1.