Window.ap is not available in mac safari jira cloud while loading modals

AP context is not available while opening modals in safari browser in mac in jira cloud

Hi @DhineshDhanapal ,

I just ran a test and was able to call AP.context.getContext() successfully in Safari on the Mac. Are you able to re-test and provide further details if it’s still a problem for you.


Hi @dmorrow,
can you share some example for them?
My use case is, on component load, I need to get custom data passed to the modal.
useEffect(() => {
if (window.AP && window.AP.dialog) {
window.AP.dialog.getCustomData(function (custProps) {
here I am not able to find window.AP object.

Hi @DhineshDhanapal ,

My test case involved calling AP.context.getContext() within a button click handler:

  onGetContextButtonClick = () => {
      errorMessage: undefined,
      busy: true
    AP.context.getContext((context) => {
      console.log('Callback from AP.context.getContext:', context);
        context: context,
        busy: false

I wonder if your useEffect hook is running before the AP object is bootstrapped?

Whilst you’re working this out, you might like to use the debug version of all.js:

<script src=""></script>

See also


Hi @dmorrow ,
I am using
< script src=“” data-options=“sizeToParent:true” async> .
I am not able to get AP object in window in mac safari particularly. but when we use AP without window container, I am getting error like AP is not defined. I am still looking for a solution to get the context object on page load using useEffect.

Dhinesh Dhanapal