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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d51d24fdd5654b3bb38de1b77cf390a1f358154825fe7c99a542eff6826b2c2a
|
|
4
|
+
data.tar.gz: c643f0571b53b9872ddb77cf323012c2627527d8eb82a132a7f970936bb596ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6b85d2aa32eed2569c9fc206fdf779ba65ab7eeeddabb8abfacc4ff67fce5c847de80429b346a8747d34dd7f0affd43de8d75e142401693fd7bfea672d829462
|
|
7
|
+
data.tar.gz: e835ce7e9b51b1cc668b1fed8e3ecfbdc5f59cd240160525296236703fa9376b61a6b7efb820a2b55df92244a8605b0d5805a881e8bb186ef7ba84aa15ca4af3
|
|
@@ -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
|
|
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
|
|