diff options
| author | fat <[email protected]> | 2013-02-07 22:13:13 -0800 |
|---|---|---|
| committer | fat <[email protected]> | 2013-02-07 22:13:13 -0800 |
| commit | 8c7f9c66a7d12f47f50618ef420868fe836d0c33 (patch) | |
| tree | 552f251d1637a1749c34fcdbb3390653d2fdb8ae /js/tests/unit/bootstrap-typeahead.js | |
| parent | ee91afba63bc6e9687397b9052858fca242c2ff5 (diff) | |
| parent | c4d47fb1ea45ed2fc3cf382d087ed87b87c69288 (diff) | |
| download | bootstrap-2.3.0.tar.xz bootstrap-2.3.0.zip | |
Merge branch '2.3.0-wip'v2.3.0
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 4bdbce970..0aa2d61b1 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() |
