uber_select_rails 1.0.0 → 1.0.1

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: 4e848d17e956bbe5c52f9f7e299e47cc2cb296755ae8ce7cbf94877b5a4857ca
4
- data.tar.gz: 87fdd8c564c2960b8d20015245aeb48b28b8c2ee7b7e12e42fd393eb49ebaeec
3
+ metadata.gz: d51d24fdd5654b3bb38de1b77cf390a1f358154825fe7c99a542eff6826b2c2a
4
+ data.tar.gz: c643f0571b53b9872ddb77cf323012c2627527d8eb82a132a7f970936bb596ef
5
5
  SHA512:
6
- metadata.gz: 4500a0a600213b393da36f7676deee006ddd301f4f258d336017e2d0260182615da1a75ccda716f231049e357049a23a25b1b26a88597d844f39423babb202b7
7
- data.tar.gz: 38d0c07a95368fcdaaa6d3338f21e572a846cf70142353e2a1ec365e6f4a9222c3ac060cd1cca6a4321b4aa1866b62421c3b1ab887e148a89801497975cda09b
6
+ metadata.gz: 6b85d2aa32eed2569c9fc206fdf779ba65ab7eeeddabb8abfacc4ff67fce5c847de80429b346a8747d34dd7f0affd43de8d75e142401693fd7bfea672d829462
7
+ data.tar.gz: e835ce7e9b51b1cc668b1fed8e3ecfbdc5f59cd240160525296236703fa9376b61a6b7efb820a2b55df92244a8605b0d5805a881e8bb186ef7ba84aa15ca4af3
@@ -1,3 +1,3 @@
1
1
  module UberSelectRails
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -139,8 +139,8 @@
139
139
  var index = select.selectedIndex
140
140
 
141
141
  if (index == undefined) { return }
142
-
143
142
  uberSearch.searchField.input.val($(select).find('option').eq(index).text())
143
+ uberSearch.searchField.input.select() // Select the text so the user can start typing over it without having to clear
144
144
  uberSearch.searchField.refresh()
145
145
  }
146
146
 
@@ -32,12 +32,18 @@
32
32
  })
33
33
 
34
34
  // When a list item is hovered
35
- $(view).on('mouseenter focus', '.result:not(.disabled)', function(){
35
+ $(view).on('mouseenter', '.result:not(.disabled)', function(){
36
36
  if ($(this).hasClass('highlighted')) { return }
37
37
  unhighlightResults()
38
- highlightResult(this, {scroll: false})
38
+ highlightResult(this, {scroll: false, focus: false})
39
39
  })
40
40
 
41
+ // When a list item receives focus from keyboard
42
+ $(view).on('focus', '.result:not(.disabled)', function(){
43
+ if ($(this).hasClass('highlighted')) { return }
44
+ unhighlightResults()
45
+ highlightResult(this, { scroll: true, focus: false })
46
+ })
41
47
 
42
48
  // HELPER FUNCTIONS
43
49
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uber_select_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Jakobsen