lato 3.11.3 → 3.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a5f0eb7f689dbdeaf6ed25131cbc8a6a4a3bdd3c0f402426373a29a9124d0506
4
- data.tar.gz: ae388fcd54a59d7ac1f0b7ca3d3a342ac7839aaee1807697159b5c5fa7c67094
3
+ metadata.gz: 0f74224daab88d3ccd9e30a552503efaa04503a4e4e1bf103bf0aefa43a1d743
4
+ data.tar.gz: 1995b2071e0ef30bfdcad2259dd90b7500af23506ac63fe77375ee8955b19920
5
5
  SHA512:
6
- metadata.gz: 4c788d7f5b53aeb6f4bea7a4d5614f12697e5883ab99ca40b6752179b1f9dd9903334455153dcbe7f89473888a2a32908bfc1f8009f9043383d836367340d881
7
- data.tar.gz: 4402d91bc41aa788e358f9aaea6592ae70630f6b9bbb375f15e51817fc3a01737d9d6b33c4c7679a1a30ae3c5e7f14c92792ee8e5eb058a0477be935d65ffb17
6
+ metadata.gz: f22a9b7694ee48adbef3b63c1d02cf6ad00b4a719c71c2099576348c6726c5cf2edc7f9b6152d2213fc3dd7ffc9242ea29ac4fe96c3874a957a32e61707ed11b
7
+ data.tar.gz: e14da8bcb3bffadcc298a41ad48e47fcdfd631a7025574f7a19e4f1a4377e9f8c449ba82ca5005216ec1b5ef130ab1da4870edeaf217d1bf8b158a7650ea520c
@@ -16,21 +16,24 @@ export default class extends Controller {
16
16
  this.tooltip = null
17
17
  this.run()
18
18
 
19
- window.addEventListener('resize', this.onWindowResize.bind(this))
19
+ window.addEventListener('resize', this.onDomChange.bind(this))
20
+ document.addEventListener('turbo:load', this.onDomChange.bind(this))
21
+ document.addEventListener('turbo:frame-load', this.onDomChange.bind(this))
20
22
  }
21
23
 
22
24
  disconnect() {
23
25
  this.storeStatus()
24
26
 
25
27
  if (this.tooltip) {
26
- this.tooltip.hide()
27
28
  this.tooltip.dispose()
28
29
  this.tooltip = null
29
30
  }
30
31
 
31
32
  this.connected = false
32
33
 
33
- window.removeEventListener('resize', this.onWindowResize.bind(this))
34
+ window.removeEventListener('resize', this.onDomChange.bind(this))
35
+ window.removeEventListener('turbo:load', this.onDomChange.bind(this))
36
+ window.removeEventListener('turbo:frame-load', this.onDomChange.bind(this))
34
37
  }
35
38
 
36
39
  itemTargetConnected(e) {
@@ -39,7 +42,6 @@ export default class extends Controller {
39
42
 
40
43
  itemTargetDisconnected(e) {
41
44
  if (this.tooltip && this.tooltip.itemKey === e.target.dataset.guideKey) {
42
- this.tooltip.hide()
43
45
  this.tooltip.dispose()
44
46
  this.tooltip = null
45
47
  }
@@ -98,7 +100,6 @@ export default class extends Controller {
98
100
  item.element.addEventListener('shown.bs.tooltip', () => {
99
101
  setTimeout(() => {
100
102
  document.getElementById(tooltipCloseId).addEventListener('click', () => {
101
- this.tooltip.hide()
102
103
  this.tooltip.dispose()
103
104
  this.tooltip = null
104
105
  this.status[item.key] = true
@@ -129,10 +130,9 @@ export default class extends Controller {
129
130
  * Events
130
131
  */
131
132
 
132
- onWindowResize(e) { // on window resize, repostion tooltip
133
+ onDomChange(e) { // when page size changes (change of length of the document), we need to reposition the tooltip
133
134
  if (this.tooltip) {
134
- this.tooltip.hide()
135
- this.tooltip.show()
135
+ this.tooltip.update()
136
136
  }
137
137
  }
138
138
  }
data/lib/lato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.11.3"
2
+ VERSION = "3.11.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.3
4
+ version: 3.11.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante