Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Bootstrap
bootstrap
Commits
0b827965
Commit
0b827965
authored
12 years ago
by
Jacob Thornton
Browse files
Options
Download
Email Patches
Plain Diff
fix regression in typeahead
#3313
parent
354f99f0
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
docs/assets/js/bootstrap-typeahead.js
+33
-27
docs/assets/js/bootstrap-typeahead.js
docs/assets/js/bootstrap.js
+33
-27
docs/assets/js/bootstrap.js
docs/assets/js/bootstrap.min.js
+1
-1
docs/assets/js/bootstrap.min.js
js/bootstrap-typeahead.js
+35
-27
js/bootstrap-typeahead.js
with
102 additions
and
82 deletions
+102
-82
docs/assets/js/bootstrap-typeahead.js
+
33
-
27
View file @
0b827965
...
...
@@ -169,7 +169,7 @@
.
on
(
'
keyup
'
,
$
.
proxy
(
this
.
keyup
,
this
))
if
(
$
.
browser
.
webkit
||
$
.
browser
.
msie
)
{
this
.
$element
.
on
(
'
keydown
'
,
$
.
proxy
(
this
.
key
press
,
this
))
this
.
$element
.
on
(
'
keydown
'
,
$
.
proxy
(
this
.
key
down
,
this
))
}
this
.
$menu
...
...
@@ -177,6 +177,38 @@
.
on
(
'
mouseenter
'
,
'
li
'
,
$
.
proxy
(
this
.
mouseenter
,
this
))
}
,
move
:
function
(
e
)
{
switch
(
e
.
keyCode
)
{
case
9
:
// tab
case
13
:
// enter
case
27
:
// escape
e
.
preventDefault
()
break
case
38
:
// up arrow
e
.
preventDefault
()
this
.
prev
()
break
case
40
:
// down arrow
e
.
preventDefault
()
this
.
next
()
break
}
e
.
stopPropagation
()
}
,
keydown
:
function
(
e
)
{
this
.
suppressKeyPressRepeat
=
!~
[
40
,
38
,
9
,
13
,
27
].
indexOf
(
e
.
keyCode
)
this
.
move
(
e
)
}
,
keypress
:
function
(
e
)
{
if
(
!
this
.
shown
||
this
.
suppressKeyPressRepeat
)
return
this
.
move
(
e
)
}
,
keyup
:
function
(
e
)
{
switch
(
e
.
keyCode
)
{
case
40
:
// down arrow
...
...
@@ -202,32 +234,6 @@
e
.
preventDefault
()
}
,
keypress
:
function
(
e
)
{
if
(
!
this
.
shown
)
return
switch
(
e
.
keyCode
)
{
case
9
:
// tab
case
13
:
// enter
case
27
:
// escape
e
.
preventDefault
()
break
case
38
:
// up arrow
if
(
e
.
type
!=
'
keydown
'
)
break
e
.
preventDefault
()
this
.
prev
()
break
case
40
:
// down arrow
if
(
e
.
type
!=
'
keydown
'
)
break
e
.
preventDefault
()
this
.
next
()
break
}
e
.
stopPropagation
()
}
,
blur
:
function
(
e
)
{
var
that
=
this
setTimeout
(
function
()
{
that
.
hide
()
},
150
)
...
...
This diff is collapsed.
Click to expand it.
docs/assets/js/bootstrap.js
+
33
-
27
View file @
0b827965
...
...
@@ -1763,7 +1763,7 @@
.
on
(
'
keyup
'
,
$
.
proxy
(
this
.
keyup
,
this
))
if
(
$
.
browser
.
webkit
||
$
.
browser
.
msie
)
{
this
.
$element
.
on
(
'
keydown
'
,
$
.
proxy
(
this
.
key
press
,
this
))
this
.
$element
.
on
(
'
keydown
'
,
$
.
proxy
(
this
.
key
down
,
this
))
}
this
.
$menu
...
...
@@ -1771,6 +1771,38 @@
.
on
(
'
mouseenter
'
,
'
li
'
,
$
.
proxy
(
this
.
mouseenter
,
this
))
}
,
move
:
function
(
e
)
{
switch
(
e
.
keyCode
)
{
case
9
:
// tab
case
13
:
// enter
case
27
:
// escape
e
.
preventDefault
()
break
case
38
:
// up arrow
e
.
preventDefault
()
this
.
prev
()
break
case
40
:
// down arrow
e
.
preventDefault
()
this
.
next
()
break
}
e
.
stopPropagation
()
}
,
keydown
:
function
(
e
)
{
this
.
suppressKeyPressRepeat
=
!~
[
40
,
38
,
9
,
13
,
27
].
indexOf
(
e
.
keyCode
)
this
.
move
(
e
)
}
,
keypress
:
function
(
e
)
{
if
(
!
this
.
shown
||
this
.
suppressKeyPressRepeat
)
return
this
.
move
(
e
)
}
,
keyup
:
function
(
e
)
{
switch
(
e
.
keyCode
)
{
case
40
:
// down arrow
...
...
@@ -1796,32 +1828,6 @@
e
.
preventDefault
()
}
,
keypress
:
function
(
e
)
{
if
(
!
this
.
shown
)
return
switch
(
e
.
keyCode
)
{
case
9
:
// tab
case
13
:
// enter
case
27
:
// escape
e
.
preventDefault
()
break
case
38
:
// up arrow
if
(
e
.
type
!=
'
keydown
'
)
break
e
.
preventDefault
()
this
.
prev
()
break
case
40
:
// down arrow
if
(
e
.
type
!=
'
keydown
'
)
break
e
.
preventDefault
()
this
.
next
()
break
}
e
.
stopPropagation
()
}
,
blur
:
function
(
e
)
{
var
that
=
this
setTimeout
(
function
()
{
that
.
hide
()
},
150
)
...
...
This diff is collapsed.
Click to expand it.
docs/assets/js/bootstrap.min.js
+
1
-
1
View file @
0b827965
This diff is collapsed.
Click to expand it.
js/bootstrap-typeahead.js
+
35
-
27
View file @
0b827965
...
...
@@ -169,7 +169,7 @@
.
on
(
'
keyup
'
,
$
.
proxy
(
this
.
keyup
,
this
))
if
(
$
.
browser
.
webkit
||
$
.
browser
.
msie
)
{
this
.
$element
.
on
(
'
keydown
'
,
$
.
proxy
(
this
.
key
press
,
this
))
this
.
$element
.
on
(
'
keydown
'
,
$
.
proxy
(
this
.
key
down
,
this
))
}
this
.
$menu
...
...
@@ -177,6 +177,40 @@
.
on
(
'
mouseenter
'
,
'
li
'
,
$
.
proxy
(
this
.
mouseenter
,
this
))
}
,
move
:
function
(
e
)
{
if
(
!
this
.
shown
)
return
switch
(
e
.
keyCode
)
{
case
9
:
// tab
case
13
:
// enter
case
27
:
// escape
e
.
preventDefault
()
break
case
38
:
// up arrow
e
.
preventDefault
()
this
.
prev
()
break
case
40
:
// down arrow
e
.
preventDefault
()
this
.
next
()
break
}
e
.
stopPropagation
()
}
,
keydown
:
function
(
e
)
{
this
.
suppressKeyPressRepeat
=
!~
[
40
,
38
,
9
,
13
,
27
].
indexOf
(
e
.
keyCode
)
this
.
move
(
e
)
}
,
keypress
:
function
(
e
)
{
if
(
this
.
suppressKeyPressRepeat
)
return
this
.
move
(
e
)
}
,
keyup
:
function
(
e
)
{
switch
(
e
.
keyCode
)
{
case
40
:
// down arrow
...
...
@@ -202,32 +236,6 @@
e
.
preventDefault
()
}
,
keypress
:
function
(
e
)
{
if
(
!
this
.
shown
)
return
switch
(
e
.
keyCode
)
{
case
9
:
// tab
case
13
:
// enter
case
27
:
// escape
e
.
preventDefault
()
break
case
38
:
// up arrow
if
(
e
.
type
!=
'
keydown
'
)
break
e
.
preventDefault
()
this
.
prev
()
break
case
40
:
// down arrow
if
(
e
.
type
!=
'
keydown
'
)
break
e
.
preventDefault
()
this
.
next
()
break
}
e
.
stopPropagation
()
}
,
blur
:
function
(
e
)
{
var
that
=
this
setTimeout
(
function
()
{
that
.
hide
()
},
150
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment