formio.js icon indicating copy to clipboard operation
formio.js copied to clipboard

this.root.focusedComponent reports undefined issue when clicking Save button of component editing dialog

Open jlzhou opened this issue 1 month ago • 1 comments

Describe the bug I am new in formio.js, I am using 5.2.2 tag release, when I click the Save button of component editing dialog, I got this.root.focusedComponent reports undefined issue

Version/Branch 5.2.2 tag release,

To Reproduce Steps to reproduce the behavior:

  1. Open an existed form in builder mode
  2. edit component by clicking the Edit button of it
  3. Click the Save button of component editing dialog
  4. See error

Expected behavior No error.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context I've tried to debug, I found the issue occurred here: https://github.com/formio/formio.js/blob/cd72b1f82bd608fee885d9f90c1464c9d692bd7b/src/components/_classes/component/Component.js#L3986

Change the code as: this.localRoot.focusedComponent = null; this.localRoot.pendingBlur = null;

The issue was gone, but I am not sure if it is correct.

jlzhou avatar Nov 16 '25 08:11 jlzhou

Hi, @jlzhou ! Thank you for reporting this issue. I am able to reproduce and have logged a ticket for the backlog.

For internal reference: FIO-10960

Victoriya25 avatar Dec 02 '25 06:12 Victoriya25