I encountered a problem which I fixed. Just wanted to let you know and pass a patch along.

PROBLEM:

To reproduce the problem, please enable this module and make sure you have at least one field with WYSIWYG editor enabled on it.

avatar_selection_pager.js has the following line:

          Drupal.attachBehaviors(data);

That casts the net a bit too wide. Because of that line, the behaviors get attached to the whole page, and WYSIWYG editor buttons simply get duplicated wherever they exist.

SOLUTION:

The above line should be replaced with the following, to apply behaviors only to the form-wrapper around the avatar images ...

          Drupal.attachBehaviors(selects.closest('.form-wrapper'));

Also, there are several places calling $(data), which is inefficiently parses the HTML every time. So it is better to parse it once and store it in a local variable.

Please see the new version avatar_selection_pager.js that is attached.

Thanks for the nice and very useful module.

CommentFileSizeAuthor
avatar_selection_pager.js1002 bytesJitesh Doshi
Support from Acquia helps fund testing for Drupal Acquia logo