Safari: can't save multiple macros on single page


we are facing issue when in Safari is not possible insert multiple macros on page. First macro is always placed correctly. Another is placed correctly in Chrome, but not in Safari. It seems to be issue of AP.confluence.saveMacro

Reproduction steps:

  1. Insert macro on page
  2. Insert another macro bellow existing

In safari is second macro not inserted to page. In dev console error: RangeError: Position -1 out of range occurs.
Expected result:
in all browsers second macro is added below first

Our chunk of code triggering the issue:

AP.confluence.saveMacro({name: macroName, timestamp: getTimestamp()}); // just some parameters passed to macro
1 Like

Issue reported to atlassian DEVHELP-4453