From b00f115b4d0df048a8f49319123a178f3ddeffb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Lef=C3=A8vre?= Date: Thu, 20 Apr 2023 07:26:55 +0000 Subject: [PATCH] [FIX] grid: don't focus input if it's unmounted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit opw-3277966 closes odoo/o-spreadsheet#2376 Signed-off-by: RĂ©mi Rahir (rar) --- src/components/grid/grid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/grid/grid.ts b/src/components/grid/grid.ts index 63d6a92cab..349d8d412f 100644 --- a/src/components/grid/grid.ts +++ b/src/components/grid/grid.ts @@ -273,7 +273,7 @@ export class Grid extends Component { !this.env.model.getters.getSelectedFigureId() && this.env.model.getters.getEditionMode() === "inactive" ) { - this.hiddenInput.el!.focus(); + this.hiddenInput.el?.focus(); } }