|
@@ -59,3 +59,18 @@
|
|
|
</script>
|
|
|
@endif
|
|
|
|
|
|
+<script once>
|
|
|
+ // on first focus (bubbles up to document), open the menu
|
|
|
+ $(document).off('focus', '.select2-selection.select2-selection--single')
|
|
|
+ .on('focus', '.select2-selection.select2-selection--single', function (e) {
|
|
|
+ $(this).closest(".select2-container").siblings('select:enabled').select2('open');
|
|
|
+ });
|
|
|
+
|
|
|
+ // steal focus during close - only capture once and stop propogation
|
|
|
+ $(document).off('select2:closing', 'select.select2')
|
|
|
+ .on('select2:closing', 'select.select2', function (e) {
|
|
|
+ $(e.target).data("select2").$selection.one('focus focusin', function (e) {
|
|
|
+ e.stopPropagation();
|
|
|
+ });
|
|
|
+ });
|
|
|
+</script>
|