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 @ 13c3c9b4

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

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