Created
October 24, 2015 18:23
-
-
Save colemanw/bc6ca673a359730fe9bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/js/Common.js b/js/Common.js | |
index 6fa4589..a882280 100644 | |
--- a/js/Common.js | |
+++ b/js/Common.js | |
@@ -409,6 +409,15 @@ if (!CRM.vars) CRM.vars = {}; | |
if (settings.ajax) { | |
$el.addClass('crm-ajax-select'); | |
} | |
+ | |
+ if (settings.placeholder || settings.placeholderOption || $el.data('placeholder') || $el.a | |
+ $el.on('select2-open', function() { | |
+ if (!$(this).val()) { | |
+ $('.select2-highlighted', '#select2-drop').removeClass('select2-highlighted'); | |
+ } | |
+ }) | |
+ } | |
+ | |
$el.select2(settings); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment