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
Community showcase
Published Tuesday in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

204 views 2 10
Read article

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