I have a fragment subform "sfPopup" which is used in the main form. See images below.
When you click on the button to show the Popup, it works fine under PDF. However, in HTML5 preview, it doesn't work.
I did debug when I preview the form using LC Form Manager. I found out that if you reference the subform object "sfNameCapture" in the fragment "spPopup" in script object "opr", the reference will fail and you will get "undefined".
Mind you that this reference is working 100% correctly in PDF preview.