Projet

Général

Profil

Paste
Télécharger (1,13 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / views / js / jquery.ui.dialog.patch.js @ 4003efde

1
/**
2
 * @file
3
 * This is part of a patch to address a jQueryUI bug.  The bug is responsible
4
 * for the inability to scroll a page when a modal dialog is active. If the content
5
 * of the dialog extends beyond the bottom of the viewport, the user is only able
6
 * to scroll with a mousewheel or up/down keyboard keys.
7
 *
8
 * @see http://bugs.jqueryui.com/ticket/4671
9
 * @see https://bugs.webkit.org/show_bug.cgi?id=19033
10
 * @see views_ui.module
11
 * @see js/jquery.ui.dialog.min.js
12
 *
13
 * This JavaScript patch overwrites the $.ui.dialog.overlay.events object to remove
14
 * the mousedown, mouseup and click events from the list of events that are bound
15
 * in $.ui.dialog.overlay.create
16
 *
17
 * The original code for this object:
18
 * $.ui.dialog.overlay.events: $.map('focus,mousedown,mouseup,keydown,keypress,click'.split(','),
19
 *  function(event) {
20
 *    return event + '.dialog-overlay';
21
 *  }).join(' '),
22
 */
23

    
24
(function ($, undefined) {
25
  if ($.ui && $.ui.dialog && $.ui.dialog.overlay) {
26
    $.ui.dialog.overlay.events = $.map('focus,keydown,keypress'.split(','),
27
      function(event) {
28
        return event + '.dialog-overlay';
29
      }).join(' ');
30
  }
31
}(jQuery));