I hope this is the right place to ask this question. I am new to developing for Office 365/SharePoint Online, though I have worked for years with on-premise SharePoint 2010 and 2013. If this is the wrong place could someone suggest an alternative.
For the home page of a SharePoint.com site I am creating a “compliance check” function. Users need to acknowledge that they confirm their compliance and optionally opt in to email alerts. I think this is a good opportunity – a learning one for me certainly – to use the Office UI Fabric, and I will add a rest api query to a list. I have made a start based on the examples of Overlay and Dialog shown on https://dev.office.com/fabric-js/Components/Dialog/Dialog.html and https://dev.office.com/fabric-js/Components/Overlay/Overlay.html
I am using a content editor web part on the home page to load HTML and JavaScript from a text file. In the file I am creating a dark overlay and a blocking dialog. I have two problems:
- the page keeps refreshing every few seconds
- the dialog doesn’t block the user from interacting with other components on the page, e.g. links to folders in a document library
Can anybody offer some insight into that?
Thanks,
Tom
Hi Tom,
 Thanks for the message. One thing you might want to think about it using SPFx instead of using a content editor web part. The reason being, is that CEWP aren’t supported in Modern pages, so in the future if you ever plan to use modern pages this won’t work.
  2nd, the js version of Fabric UI doesn’t get as much love as some of the newer components built in React. I have pulled up that library for the js and indeed it looks like the blocking functionality isn’t working (you may want to report it, though you likely won’t get much/fast support). So if you continue to use the js library, you may have to implement the blocking functionality yourself. That is, create a html wrapper around the dialog, set it to fixed and have it cover the page, so you can’t click behind it.
As for the refresh, I’m not sure why that would be happening. If you could load some of your code in a jsfiddle, we could try and help out.
Hi Tom,
From the links you have shared I assume you are using the fabric core which is the js version of office fabric & not the fabric react version. As Beau said, if you can choose SPFx as your dev platform instead of using a CEWP, you can go for fabric react which gets a nice support. Also do you have any errors in your console that would help in finding exact issue?
Being said that do look at this thread to know the intended behaviour of the dialog overlay. https://github.com/OfficeDev/office-ui-fabric-js/issues/242
I wonder whether DocRead product covers this use case. I would imagine that it can treat Pages as a list item to acknowledge site usage for compliance purposes.Â