CRM-13966 - Workaround for ui.dialog & select2 conflict
authorColeman Watts <coleman@civicrm.org>
Sun, 2 Feb 2014 05:00:10 +0000 (21:00 -0800)
committerColeman Watts <coleman@civicrm.org>
Sun, 2 Feb 2014 05:00:10 +0000 (21:00 -0800)
js/Common.js

index 0c0a047c5b6f1fcad590b155003dca1603b21bb4..d219d60c5560baa77919c29e5e39894f9dc22ec3 100644 (file)
@@ -261,6 +261,11 @@ CRM.validate = CRM.validate || {
   // https://github.com/ivaynberg/select2/pull/2090
   $.fn.select2.defaults.width = 'resolve';
 
+  // Workaround for https://github.com/ivaynberg/select2/issues/1246
+  $.ui.dialog.prototype._allowInteraction = function(e) {
+    return !!$(e.target).closest('.ui-dialog, .ui-datepicker, .select2-drop').length;
+  };
+
   // Initialize widgets
   $(document).on('crmLoad', function(e) {
     $('table.row-highlight', e.target)