changeset 68c47b51bdd4 in sao:5.0 details: https://hg.tryton.org/sao?cmd=changeset;node=68c47b51bdd4 description: Set focus on the form if it does not have it
When set_cursor is called, it should force to set the focus on the first focusable widget of the form. issue8604 review258011002 (grafted from d8401a59de642e154d99c4f48c04bc29e9a44f28) diffstat: src/view/form.js | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diffs (14 lines): diff -r 126c6d268d82 -r 68c47b51bdd4 src/view/form.js --- a/src/view/form.js Mon Sep 02 18:31:43 2019 +0200 +++ b/src/view/form.js Mon Sep 02 18:33:18 2019 +0200 @@ -404,8 +404,8 @@ var widgets, error_el, pages, is_ancestor; var currently_focused = jQuery(document.activeElement); - var has_focus = currently_focused.closest(this.el) > 0; - if (reset_view || has_focus) { + var has_focus = currently_focused.closest(this.el).length > 0; + if (reset_view || !has_focus) { if (reset_view) { for (i = 0; i < this.notebooks.length; i++) { notebook = this.notebooks[i];