Drafts not closing the Actions panel after successful x-callback-url?

  • Drafts 26.2.4
  • iOS 14.4.2

I’ve owned Drafts for probably 9 years, but embarrassingly I just started playing around with x-callback-url's :disappointed: . I’m using it to run a Shortcut that saves the Draft as a text file into my iCloud Drive. It works.

The problem is that after success, when Drafts.app re-opens the Action panel remains open. I think it used to close automatically. I can’t figure out if this is a bug or if I need to pass back some return value/parameter to get the panel to close on success?

Here’s my Action:
Callback URL Template:

If you want to force the action list to close, even if pinned open, you can use a script action containing app.hideActionlist();

If your action list is set to auto hide, then you probably just need to switch the focus away from it and back to the editor. You can do that with a script action containing editor.activate();

1 Like

Drafts does not automatically close the action panel after actions are run.

If you want to explicitly force that, you could end your action with a script action step that calls app.hideActionList() docs.

Note, for reference, there is a Run Shortcut that is a little easier to configure than constructing your own x-callback-url.

1 Like

@agiletortoise Whoo hoo :tada: That was it! Thank you (and @sylumer) for the kick in the right direction.

I added a script step containing this single line: app.hideActionList(); and that did the trick.

I did originally start with Run Shortcut but was just testing the x-callback method to see if that made any difference re: my original problem. I’ll switch back. Thanks again.