nfg_ui 6.17.1 → 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: 385311e03c88b1813a4d5cb015f61528e2870aa02b01ababb7dbbce6a850fc00
4
- data.tar.gz: 387165bb290837d4442aaba42f43c47c49ac6f8e726926f34de2cc1f24734643
3
+ metadata.gz: e3e2c7c566deb4ca1543c281cdfa7655d38549b053dd467534caca7ec6f91ed6
4
+ data.tar.gz: be6eab34f8af4bee69c5f7bc86452d71ef3180cdc19bb129ced5204c55d10c14
5
5
  SHA512:
6
- metadata.gz: 060b64c7715f2d59c808fa5f14a129bc51f4541541ae34de9e27370c5722f5d245173020d6bcaf0eb3a2efeed4a6d5a0b04edcef90cc510ef27df45e8838b116
7
- data.tar.gz: d791e570e06323873eef9188055f50a5dc7d062e25d6b4f9e08505b86a2fb78bc3927eda391e889021b7b26d8f48bd28a55ab46f352fc5adec1960b51a3bbb90
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.1'
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.1
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