beyond-rails 0.0.271 → 0.0.272

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: 01dd97cd11c2e48ea6e8418c073f9ca5ca91e311873309f7651e4174c00e2c84
4
- data.tar.gz: 6e6598b62c2149288f16856521ad20a397c8fdb127698c7e56d7dcbcc8baa498
3
+ metadata.gz: 90e90e6f38c45540cbedb5ccc0341459c5a9a210d27c472aa97b340a4b2d9814
4
+ data.tar.gz: 34f2a1783e2c88888e782bdb42517d0a53b2dd6505a69542519aac2689e20d2c
5
5
  SHA512:
6
- metadata.gz: 12da64daa3b927b0b6a4d3f7bfac9803211926a2f6973362271576e2ef8c4e6cd6818ec118ddd4e525a709e595e0c6eafe5847114c42449c06dd48a7fe78bb7a
7
- data.tar.gz: 2e571a176fc54d6fd755d15d4a974b20cc808b2c7bc2673426f4ec74e3f0c0bb65fe5aeb7a14ab580c473fc09fecb3c794302750ccec5c905733ea4ef5a06876
6
+ metadata.gz: 355b5f4412816e6219309c12a2b9a779920bb9e1dda4a1c65827efddad7a51dcc20cac7fafea460fe48f7550a28b44741f7f13112d9f6d265718d1587980bd38
7
+ data.tar.gz: da9e828f1ecc04b2398ff6418da097a88895454f5cc24d0e9c935cacfcc5cc0da10d4b0417e1f232e61e5765cd5c627cc31404719ba995ade2d430d5a8ce7716
@@ -247,17 +247,10 @@ export default class SearchDropdown {
247
247
  return Array.from(this.menuContent.querySelectorAll('[data-item]'))
248
248
  }
249
249
 
250
- findClickedItem(target, parent) {
251
- const rows = this.getMenuItemEls()
252
- let node = target
253
- while (node.parentNode !== parent) {
254
- if (node.dataset && ('item' in node.dataset)) {
255
- const index = rows.findIndex(row => row === node)
256
- return this.items[index]
257
- }
258
- node = node.parentNode
259
- }
260
- return null
250
+ findClickedItem(target) {
251
+ const index = this.getMenuItemEls()
252
+ .findIndex(item => (target === item) || (item.contains(target)))
253
+ return this.items[index]
261
254
  }
262
255
 
263
256
  isInputFocused() {
@@ -248,7 +248,7 @@ export default class TagInput {
248
248
 
249
249
  destroy() {
250
250
  this.tags.forEach(tag => tag.remove())
251
- this.inputDiv.remove()
251
+ this.inputDiv && this.inputDiv.remove()
252
252
  this.canvas = null
253
253
  this.input = null
254
254
  this.suggestInput = null
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.271
4
+ version: 0.0.272
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmsheng