changeset 1f6f4158f261 in sao:4.8 details: https://hg.tryton.org/sao?cmd=changeset;node=1f6f4158f261 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 c1ebd7702b2a -r 1f6f4158f261 src/view/form.js --- a/src/view/form.js Wed Aug 28 22:27:30 2019 +0200 +++ b/src/view/form.js Mon Sep 02 18:33:18 2019 +0200 @@ -395,8 +395,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];