Commit d5345f80 authored by fat's avatar fat

Merge branch 'master' of git://github.com/marcelkorpel/bootstrap into marcelkorpel-master

parents 9f297857 0dece7a7
......@@ -265,6 +265,7 @@
e.stopPropagation()
e.preventDefault()
this.select()
this.$element.focus()
}
, mouseenter: function (e) {
......
......@@ -192,17 +192,22 @@ $(function () {
}).appendTo('body')
, typeahead = $input.data('typeahead')
, changed = false
, focus = false
, blur = false
$input.val('a')
typeahead.lookup()
$input.change(function() { changed = true });
$input.focus(function() { focus = true; blur = false });
$input.blur(function() { blur = true; focus = false });
$(typeahead.$menu.find('li')[2]).mouseover().click()
equals($input.val(), 'ac', 'input value was correctly set')
ok(!typeahead.$menu.is(':visible'), 'the menu was hidden')
ok(changed, 'a change event was fired')
ok(focus && !blur, 'focus is still set')
$input.remove()
typeahead.$menu.remove()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment