I would like to give my users the possibility to view a content macro in full screen mode.
So when a user sees my macro in the page he can click the full screen button and I open a dialog with the following JS code:
window.AP.dialog.create({
key: 'fullScreenMacro',
chrome: false,
width: "100%",
height: "100%",
closeOnEscape: true,
customData: {
contentId,
version
}
});
Which opens the module defined in atlassian-connect.json:
...
"modules": {
"generalPages": [
{
"key": "fullScreenMacro",
"location": "hidden",
"url": "?mode=fullscreen",
"name": {
"value": "Mind Map"
}
}
...
The issue now is, that the iframe that Confluence is opening does not always have a height of 100%, but rather depends on the scroll offset in the confluence page.
When the confluence page is at the top, the dialog has a height of 100%. If the page is scrolled down before opening the dialog the height of the dialog is reduced by the amount of pixels scrolled. If scrolled down to 100% of the browsers view height (100vw) the macro suddenly gets to be 100% height again.
Does look like a bug in connect to me. Anybody else seeing this or am I doing something wrong?