[FIX] hide form autofocus trying to focus destroyed fields under the rug
authorXavier Morel <xmo@openerp.com>
Tue, 12 Mar 2013 13:21:44 +0000 (14:21 +0100)
committerXavier Morel <xmo@openerp.com>
Tue, 12 Mar 2013 13:21:44 +0000 (14:21 +0100)
lp bug: https://launchpad.net/bugs/1153437 fixed

bzr revid: xmo@openerp.com-20130312132144-o5enjfemuk5zxilz

addons/web/static/src/js/view_form.js

index d81ccbd..673bfc7 100644 (file)
@@ -3306,7 +3306,7 @@ instance.web.form.FieldMany2One = instance.web.form.AbstractField.extend(instanc
     },
     focus: function () {
         if (!this.get('effective_readonly')) {
-            this.$input[0].focus();
+            this.$input && this.$input[0].focus();
         }
     },
     _quick_create: function() {