Skip to content

Commit fe38d12

Browse files
committed
rebuild - fix missing (
1 parent 667179f commit fe38d12

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

docs/assets/js/bootstrap-typeahead.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@
174174
.on('keypress', $.proxy(this.keypress, this))
175175
.on('keyup', $.proxy(this.keyup, this))
176176

177-
if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
177+
if (this.eventSupported('keydown')) {
178178
this.$element.on('keydown', $.proxy(this.keydown, this))
179179
}
180180

@@ -183,6 +183,15 @@
183183
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
184184
}
185185

186+
, eventSupported: function(eventName) {
187+
var isSupported = eventName in this.$element
188+
if (!isSupported) {
189+
this.$element.setAttribute(eventName, 'return;')
190+
isSupported = typeof this.$element[eventName] === 'function'
191+
}
192+
return isSupported
193+
}
194+
186195
, move: function (e) {
187196
if (!this.shown) return
188197

docs/assets/js/bootstrap.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1797,7 +1797,7 @@
17971797
.on('keypress', $.proxy(this.keypress, this))
17981798
.on('keyup', $.proxy(this.keyup, this))
17991799

1800-
if ($.browser.chrome || $.browser.webkit || $.browser.msie) {
1800+
if (this.eventSupported('keydown')) {
18011801
this.$element.on('keydown', $.proxy(this.keydown, this))
18021802
}
18031803

@@ -1806,6 +1806,15 @@
18061806
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
18071807
}
18081808

1809+
, eventSupported: function(eventName) {
1810+
var isSupported = eventName in this.$element
1811+
if (!isSupported) {
1812+
this.$element.setAttribute(eventName, 'return;')
1813+
isSupported = typeof this.$element[eventName] === 'function'
1814+
}
1815+
return isSupported
1816+
}
1817+
18091818
, move: function (e) {
18101819
if (!this.shown) return
18111820

0 commit comments

Comments
 (0)