☝️Small business or a startup? See if you qualify for our special offer.
+

Flexmonster Number Formatting Modal within Shadow DOM

Answered
quadh85 asked on May 14, 2025

Hi FM team,

I am using FM v2.9.103, and creating FM within a shadow DOM (web components).

When the number formatting modal is shown, after changing the options and clicking on Apply button, the following error is shown in console:

polyfills.js:1
Uncaught TypeError: Cannot set properties of null (setting 'disabled') at g (flexmonster.js?v=6fe27a08:71117:81) at FlexmonsterToolbar.showFormatCellsDialog (flexmonster.js?v=6fe27a08:71243:7) at FlexmonsterToolbar.formatCellsHandler (flexmonster.js?v=6fe27a08:70792:12)

Upon further investigation of the stacktrace:-

      }, g = function() {

        var p = null != x.getValue(), B = !p;

        document.querySelector(".fm-popup-format-cells #fm-btn-apply").disabled = B;

It seems that the document.querySelector cannot find the Apply button since it is in the shadowRoot.

Please note that clicking the Apply button could not close the modal; I had to click the ''Cancel'' button instead. Hence the number formatting options were not able to be applied.

Are there any ways I can get around this problem?

Thanks in advance.

 

5 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster May 14, 2025

Hello!

Thank you for reaching out to us.

We have reproduced the described behavior of the Number Formatting popup in ShadowDOM. Our Dev team will take a closer look at the case and get back to you with the fix with ETA June 23.

Our team will notify you about any updates on the matter.

Feel free to reach out to us in case of any other questions.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster June 24, 2025

Hello!

Hope you are doing well.

Our team is happy to inform you that the issue with the APPLY button being null in the shadow DOM was fixed.
The fix is included in the 2.9.106 version of Flexmonster: https://www.flexmonster.com/release-notes/version-2-9-106/.

You are welcome to update the component: https://www.flexmonster.com/doc/updating-to-the-latest-version/.

Please let us know if the fix works well for you.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster July 2, 2025

Hello!

Hope you are having a great week.

Our team is wondering if you had a chance to check the fix for the Number Formatting pop-up in shadowDOM. Could you please let us know if everything works well now?

Looking forward to hearing from you.

Kind regards,
Solomiia

Public
quadh85 21 hours ago

Hi, the issue has been resolved. the button can be clicked and the modal can be closed.

thank you

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster 13 hours ago

Hello!

Thank you for your feedback.

We are happy to hear that everything works well after the fix.

Feel free to reach out in case of any other questions.

Kind regards,
Solomiia

Please login or Register to Submit Answer