changeset b96e0f2f2edb in sao:4.4 details: https://hg.tryton.org/sao?cmd=changeset;node=b96e0f2f2edb 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 824156aac1d9 -r b96e0f2f2edb 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 @@ -386,8 +386,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];