From ae90842be8a87999e0cdbbf00b86b1bbf92992ce Mon Sep 17 00:00:00 2001 From: Mohammed Shekha Date: Wed, 13 Jan 2021 12:34:59 +0000 Subject: [FIX] web: keep focus on searchbar when Tab pressed before this commit: when searchbar has autocomplete and user press Tab key then focus goes out of searchbar input while it should keep focus on searchbar so that user can do search on other term. after this commit: when searching on searchbar and pressing Tab key will keep focus on searchbar input so that user can search again. task-2393772 closes odoo/odoo#64471 Signed-off-by: Aaron Bohy (aab) --- addons/web/static/src/js/control_panel/search_bar.js | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/web/static/src/js') diff --git a/addons/web/static/src/js/control_panel/search_bar.js b/addons/web/static/src/js/control_panel/search_bar.js index c3f8d1ec4d6..dd0d4460350 100644 --- a/addons/web/static/src/js/control_panel/search_bar.js +++ b/addons/web/static/src/js/control_panel/search_bar.js @@ -421,6 +421,7 @@ odoo.define('web.SearchBar', function (require) { /* falls through */ case 'Tab': if (this.state.inputValue.length) { + ev.preventDefault(); // keep the focus inside the search bar this._selectSource(currentItem); } break; -- cgit v1.2.3