diff --git a/newIDE/app/src/EventsSheet/index.js b/newIDE/app/src/EventsSheet/index.js index 01c42ffee8bf..9d0533d08794 100644 --- a/newIDE/app/src/EventsSheet/index.js +++ b/newIDE/app/src/EventsSheet/index.js @@ -1275,6 +1275,14 @@ export class EventsSheetComponentWithoutHandle extends React.Component< }, () => { if (this._eventsTree) this._eventsTree.forceEventsUpdate(); + // The focus is lost because the button "(or paste conditions/actions)" + // no long exist. + // Ideally, we'd wait for the events to be updated, but + // to simplify the code, we just wait a few ms for a new render + // to be done. + setTimeout(() => { + this._ensureFocused(); + }, 100); // A few ms is enough for a new render to be done. } ); };