How to use custom dialog for macros in confluence

Hi guys,

I am trying to solve an issue I have with a library inside my macro. The new update of the lib introduces a svg node - which is invisible -, which is used to calculate the center of the document to position the diagram(s). The problem is that, when I add more than one of my macros to one page, the page reloads or throws an error - depending on the browser. 

After some digging I found out, that this invisible svg node collides with the dim function inside blanket.js of AUI. Since it is a svg element and svg elements to not have the property className, I get element.className.match is not a function

I tried to use jQuery's UI Dialog implementation, but I get the same exact error. Somehow the Macro Dialog still opens and the hides away. Is there a way to shut down the dialog from confluence and force confluence to use my Dialogs and not the AUI Dialogs?

When I remove the svg node from the dom, the error does not occur then anymore. 

What are my possibilities now? Monkey patch blanket.js? Patch Lib? Dump AUI Dialog or whatever it is, that pops up when I try to add a macro to a page.

I hope I made my self clear....If not, do not hesitate to ask me. Any help is highly appreciated. Stucked on this for a while now....


Thanks in advance!

0 answers

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

450 views 21 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you