When Image Browser loses all its styling

The Image Browser project for Drupal 6.x provides a nice Media-esque modal dialogue for inserting your uploaded images into a rich-text field. However, the transition between the two panes of the modal workflow - image selection, to entering extra details like alignment classes - is handled by Javascript.

This means that if you have an entirely different module, whose Drupal Javascript behavior throws an error, then your whole cycle of behavior calls fall over. The callback between the two panes fails to bind to the form onsubmit, and so submitting one pane leads to an unstyled version of the second one and a change in the URL of the modal iframe.

This happened recently with the Colorbox module. The only solution is to configure its Javascript not to appear on that page: if you’re dealing with a module that has no such configuration options, then good luck….