## Summary After uploading an image/file to the empty avatar field in the person tab, the edit icon next to the field would not appear until the browser was refreshed or another field was clicked. ### Root cause - When user clicks over the avatar field, `recordFieldListCellEditModePosition` is set to `globalIndex` - That is fine when a avatar already exists. But when there is no avatar already set, the native file picker is opened with no `onClose` handler attached. - So after the file upload is completed, `recordFieldListCellEditModePosition` is never reset to null. - `FieldsWidgetCellEditModePortal` stays anchored to the avatar file element - When the user hovers over the same field again, its hover portal tries to compete to anchor for the same element - So, `RecordInlineCellDisplayMode ` (the edit button) doesn't render ### Fix - Pass the `onClose` function through `openFieldInput` to `openFilesFieldInput` - `onClose` resets `recordFieldListCellEditModePosition` back to null, when the upload completes. ## Before https://github.com/user-attachments/assets/ac9318e9-5471-434c-8af3-5c20d0112460 ## After https://github.com/user-attachments/assets/0d064a7f-95ad-4b92-a9ee-d9570f360972 Fixes #19595 --------- Co-authored-by: Charles Bochet <charles@twenty.com>