mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 01:16:19 +00:00
[third] Modify bootstrap to help fix various compose box bugs
(imported from commit 6737adac5c09c41643210f4f0ae537304e0f87ae)
This commit is contained in:
18
zephyr/static/third/bootstrap/js/bootstrap.js
vendored
18
zephyr/static/third/bootstrap/js/bootstrap.js
vendored
@@ -1811,9 +1811,6 @@
|
|||||||
|
|
||||||
switch(e.keyCode) {
|
switch(e.keyCode) {
|
||||||
case 9: // tab
|
case 9: // tab
|
||||||
if (!this.options.tabSelects)
|
|
||||||
break
|
|
||||||
|
|
||||||
case 13: // enter
|
case 13: // enter
|
||||||
case 27: // escape
|
case 27: // escape
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
@@ -1830,7 +1827,9 @@
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
e.stopPropagation()
|
if (this.options.stopAdvance || (e.keyCode != 9 && e.keyCode != 13)) {
|
||||||
|
e.stopPropagation()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
, keydown: function (e) {
|
, keydown: function (e) {
|
||||||
@@ -1850,8 +1849,7 @@
|
|||||||
break
|
break
|
||||||
|
|
||||||
case 9: // tab
|
case 9: // tab
|
||||||
if (!this.options.tabSelects)
|
if (this.options.tabSkips) break
|
||||||
break
|
|
||||||
|
|
||||||
case 13: // enter
|
case 13: // enter
|
||||||
if (!this.shown) return
|
if (!this.shown) return
|
||||||
@@ -1867,7 +1865,10 @@
|
|||||||
this.lookup()
|
this.lookup()
|
||||||
}
|
}
|
||||||
|
|
||||||
e.stopPropagation()
|
if (this.options.stopAdvance || (e.keyCode != 9 && e.keyCode != 13)) {
|
||||||
|
e.stopPropagation()
|
||||||
|
}
|
||||||
|
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1909,7 +1910,8 @@
|
|||||||
, menu: '<ul class="typeahead dropdown-menu"></ul>'
|
, menu: '<ul class="typeahead dropdown-menu"></ul>'
|
||||||
, item: '<li><a href="#"></a></li>'
|
, item: '<li><a href="#"></a></li>'
|
||||||
, minLength: 1
|
, minLength: 1
|
||||||
, tabSelects: true
|
, tabSkips: false
|
||||||
|
, stopAdvance: false
|
||||||
}
|
}
|
||||||
|
|
||||||
$.fn.typeahead.Constructor = Typeahead
|
$.fn.typeahead.Constructor = Typeahead
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user