jquery.ui.dialog.patch.js 1.1 KB

123456789101112131415161718192021222324252627
  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. (function ($, undefined) {
  22. if ($.ui && $.ui.dialog) {
  23. $.ui.dialog.overlay.events = $.map('focus,keydown,keypress'.split(','),
  24. function(event) { return event + '.dialog-overlay'; }).join(' ');
  25. }
  26. }(jQuery));