nfg_ui 6.17.0 → 6.17.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 79a77fa158b8e65c640f998d3095a85401e0a21850a5b222bafbdfd392fdd89a
4
- data.tar.gz: b8d6e582be486b664b523b6531cf8e9a4452fe3f891a357028c7a3dfe86607fa
3
+ metadata.gz: e3e2c7c566deb4ca1543c281cdfa7655d38549b053dd467534caca7ec6f91ed6
4
+ data.tar.gz: be6eab34f8af4bee69c5f7bc86452d71ef3180cdc19bb129ced5204c55d10c14
5
5
  SHA512:
6
- metadata.gz: 5ce8219cfa1b71dda92e0e793809e98358d088a884b572ac65c7233d96bb43649719f3d2aaca7996921a81484b40346d8f1d341849cc8b0178c73e1ff10625e0
7
- data.tar.gz: 0dde6820b59e8c0e7ced6efe7b308864948153fc190f183c26633174003e555aa10882748f86b5017941573ffbb22a9b73e1b304934b661bfd0b37ddd1c4c48d
6
+ metadata.gz: ea205f7cae436a7e969d498939df457c2fb852faf8d087c86d24becd6e47760a86ec032411dd78e1a85ef13babb44b5c97807b7963d0969526e6c5adc3b8a6a7
7
+ data.tar.gz: fc0388722f52900ea2276e97603d2f3c07e3de3d50b251fa4bb25de6e3baa0a319fa83e4cef019f52e33eaafd6242042f049a1b7746ded57fdd5e6d2de217d0e
@@ -26,8 +26,21 @@ initNfgUiSelect2 = () ->
26
26
 
27
27
  # Likewise with the shown.bs.modal, the same applies here for re-initializing on body
28
28
  # after the a tooltipped element is removed from the page
29
+ # Also re-initializing the select2 element to fix the issue mentioned in
30
+ # https://bonterra.atlassian.net/browse/NFG-513
31
+ # Reason: re-initialization of body affects the select2 inputs present on the screen.
32
+ # The destroy() and reinitialize process ensures Select2 works correctly after the modal
33
+ # is closed.
29
34
  doc.on 'hidden.bs.modal ajax:success', (e) ->
30
35
  init_plugin body
36
+ setTimeout ->
37
+ $('select.select2').each ->
38
+ $(this).select2('destroy').select2()
39
+ , 0
40
+
41
+ # on first focus (bubbles up to document), open the menu
42
+ doc.on 'focus', '.select2-selection.select2-selection--single', (e) ->
43
+ $(this).closest('.select2-container').siblings('select:enabled').select2('open')
31
44
 
32
45
  if NfgUi.turbolinks
33
46
  $(document).on('turbolinks:load', initNfgUiSelect2)
@@ -2,6 +2,7 @@
2
2
  .#{$color} {
3
3
  .select2-container--default {
4
4
  .select2-search--dropdown .select2-search__field:focus,
5
+ &.select2-selection--single:focus,
5
6
  &.select2-container--focus .select2-selection--multiple,
6
7
  &.select2-container--open .select2-selection--single {
7
8
  border-color: $value;
@@ -2,6 +2,7 @@
2
2
 
3
3
  .select2-container--default {
4
4
  &.select2-container--focus .select2-selection--multiple,
5
+ &.select2-selection--single:focus,
5
6
  &.select2-container--open .select2-selection--single {
6
7
  border-color: var(--brand-primary) !important;
7
8
  box-shadow: 0 0 0 ($spacer * .125) var(--brand-primary-transparent);
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NfgUi
4
- VERSION = '6.17.0'
4
+ VERSION = '6.17.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nfg_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.17.0
4
+ version: 6.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Roehm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-08-29 00:00:00.000000000 Z
12
+ date: 2024-09-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap