function views_ui_library_alter

This is part of a patch to address a jQueryUI bug. The bug is responsible for the inability to scroll a page when a modal dialog is active. If the content of the dialog extends beyond the bottom of the viewport, the user is only able to scroll with a mousewheel or up/down keyboard keys.

The javascript patch overwrites the $.ui.dialog.overlay.events object to remove the mousedown, mouseup and click events from the list of events that are bound in $.ui.dialog.overlay.create.

See also

http://bugs.jqueryui.com/ticket/4671

https://bugs.webkit.org/show_bug.cgi?id=19033

/js/jquery.ui.dialog.patch.js

/js/jquery.ui.dialog.min.js

File

drupal/core/modules/views_ui/views_ui.module, line 410
Provide structure for the administrative interface to Views.

Code

function views_ui_library_alter(&$libraries, $module) {
  if ($module == 'system' && isset($libraries['jquery.ui.dialog'])) {
    if (version_compare($libraries['jquery.ui.dialog']['version'], '1.7.2', '>=')) {
      $libraries['jquery.ui.dialog']['js'][drupal_get_path('module', 'views') . '/js/jquery.ui.dialog.patch.js'] = array();
    }
  }
}