Steps to reproduce:
- enable the dev mode in nuxeo.conf
- install nuxeo-web-ui
- start Nuxeo
- edit the file nxserver/nuxeo.war/ui/nuxeo-web-ui-bundle.html
- add at the beginning, before the first nuxeo-slot-content, the following code
- log in
- navigate to a File document
- put the cursor over the Clipboard icon and observe the tooltip is not displayed
- click on the Clipboard icon and observe the icon is not refreshed to indicate the new state
- in the browser console, you will the following error
The problem seems to be that the JS code modifies how the code is loaded and the document is still undefined when some functions are called (like the first call to update for nuxeo-clipboard-toggle-button
If the JS code is put at the end of nxserver/nuxeo.war/ui/nuxeo-web-ui-bundle.html, everything works fine.
Reproduced 9.10 and 10.2 with Chrome, but it probably affects all browsers.