diff options
author | fat <jacobthornton@gmail.com> | 2012-12-22 05:19:36 +0400 |
---|---|---|
committer | fat <jacobthornton@gmail.com> | 2012-12-22 05:19:36 +0400 |
commit | d5345f806c7e8cd25494967bd371aef7a3fc4a63 (patch) | |
tree | fdb84904a8e322ed706fbca987b6b0b0bad0721d /js/tests/unit/bootstrap-typeahead.js | |
parent | 9f29785783e58a7ffc6f8779c2ae55edebd54ba2 (diff) | |
parent | 0dece7a71f4f3591c7d1fecb9dea7cba82c9624a (diff) |
Merge branch 'master' of git://github.com/marcelkorpel/bootstrap into marcelkorpel-master
Diffstat (limited to 'js/tests/unit/bootstrap-typeahead.js')
-rw-r--r-- | js/tests/unit/bootstrap-typeahead.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/tests/unit/bootstrap-typeahead.js b/js/tests/unit/bootstrap-typeahead.js index 4bdbce9709..0aa2d61b17 100644 --- a/js/tests/unit/bootstrap-typeahead.js +++ b/js/tests/unit/bootstrap-typeahead.js @@ -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() |