beyond-rails 0.0.174 → 0.0.175

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: fb6cc664c895e3beeeac6fe084c161fafd8c5e6a14528e7cfac406e2c1ff73fa
4
- data.tar.gz: 7934608321985371bf12d6e22c1fb084c09c8da04cd67409ef56a80d2e4f6bf3
3
+ metadata.gz: 682963ebc3015dfcf24113949df5554761f5363b7b83d5f7a4c9d69e50ff0f70
4
+ data.tar.gz: 92393eb1b29e88edd1bf637c2aa9c500f2cf4019c53c31aeb17de58ae49148a2
5
5
  SHA512:
6
- metadata.gz: 22fcfa6f7b34d2e477add0179c8f07aac9d51be5a244645d652f364483eda83075b128b6ef4df28558d33b022044e289c10c1c4f3cde2f8ded1c91b76bde22e9
7
- data.tar.gz: 934d0818ac057a0642aeb514df5309310b7e155ad126cb20652bc09b903cb0fd748bfeb83c673f8ddeea7338e7affa95e15d58dcb928dec5dccac34a742b85ab
6
+ metadata.gz: e2d62b593596f1dc57a412468478a9fa4b13cb52b6d52455f7b6d159650159027293b4c4b644da16efdf2584ad15b1ebb1d466fc9fc7a487bae519412efe373d
7
+ data.tar.gz: 70afeb7b19f2e541e7ed01c009b60d2f4012f3141e222918bda3c2f16421844c5dbc85470fd0a8005881569f3048ae785b88f5f3bc85b22a1a726afa1e1b78d0
@@ -66,7 +66,6 @@ export default class Autocomplete {
66
66
  menu.on('click', index => {
67
67
  const { itemClick } = this.options
68
68
  if (typeof itemClick === 'function') {
69
- clearTimeout(this._blurTimer)
70
69
  const value = itemClick(this.rows[index])
71
70
  this.dom.value = value
72
71
  this.menu.hide()
@@ -82,8 +81,13 @@ export default class Autocomplete {
82
81
  }
83
82
  })
84
83
 
85
- this.addEvent(dom, 'blur', () => {
86
- this._blurTimer = setTimeout(() => this.menu.hide(), 50)
84
+ this.addEvent(document, 'click', event => {
85
+ const { target } = event
86
+ const inInput = this.dom.contains(target)
87
+ const inMenu = this.menu.dom.contains(target)
88
+ if ((! inInput) && (! inMenu)) {
89
+ this.menu.hide()
90
+ }
87
91
  })
88
92
 
89
93
  this.addEvent(dom, 'keyup', debounce(() => {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.174
4
+ version: 0.0.175
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmsheng
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-07-14 00:00:00.000000000 Z
12
+ date: 2020-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc