[FIX] web: Set focus on first field when opening a modal

This will improve the onbarding of project and the usability in general.

Project: When creating a project a small modal opens with one or more fields, and you have to click on it just to type the project name.

Usability: one many2one (and others), when clicking on "Create and Edit", the focus is set on the first field.
This commit is contained in:
Jitendra Prajapati
2016-09-16 11:19:15 +02:00
committed by Yannick Tivisse
parent 89cbef8540
commit c129ae36aa
@@ -930,8 +930,8 @@ var FormViewDialog = ViewDialog.extend({
var fragment = document.createDocumentFragment();
self.view_form.appendTo(fragment).then(function () {
self.view_form.do_show().then(function() {
self.view_form.autofocus();
_super().$el.append(fragment);
self.view_form.autofocus();
});
});
});