summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorMohammed Shekha <msh@odoo.com>2021-01-13 12:34:59 +0000
committerMohammed Shekha <msh@odoo.com>2021-02-15 09:11:22 +0000
commitae90842be8a87999e0cdbbf00b86b1bbf92992ce (patch)
tree747b459447f0f205afeceb159b0a917a8f8633ec /addons/web/static/src
parentb9052f30dd8c26e0402a7f4a55b72204e9f1e633 (diff)
[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) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/control_panel/search_bar.js1
1 files changed, 1 insertions, 0 deletions
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;