SignaturePad — Image url empty on first "Save", only a second native click fixes it

Context:
I’m using the SignaturePad plugin to capture a drawn annotation in a popup. The workflow on clicking a “Confirm” button is:

  1. Save SignaturePad A
  2. Pause 1000ms
  3. Make changes to Thing → Photo_Nord_Annotee = SignaturePad A’s Image url (Only when Image url is not empty)
  4. Clear SignaturePad A
  5. Hide Popup

Problem:
On the first click after the popup opens, the “Save” action never fills Photo_Nord_Annotee — the “is not empty” condition blocks the step, as if SignaturePad A’s Image url were empty. On the second click (without closing the popup or reloading), everything works perfectly.

Tests performed to isolate the cause:

  • Checked via $0.toDataURL().length in the Chrome console, on the actual plugin element: the canvas does contain the drawing (dataURL of ~28,000 characters) from the very first click, before even calling Save. So this isn’t a canvas rendering or timing issue.
  • Tested with an Alert showing SignaturePad A’s Image url right after Save: empty on the 1st click, filled on the 2nd click.
  • Tested with a 10-second pause before Save: no change, first click still fails.
  • Tested with two “Save SignaturePad A” actions back-to-back in the same workflow: no change, still empty until a real 2nd user click.
  • Tested by isolating the action in a separate Custom Event (to force a fresh Bubble data snapshot): no change.

Tentative conclusion:
It seems the plugin only syncs/publishes the Image url data to the Bubble-exposed state after an actual second native click event on the page — regardless of how many times the “Save” action is triggered from a Bubble workflow.

Question: Is this a known bug? Is there a plugin action (like “Initialize” or “Resize”) that could be called when the popup opens to force this sync from the start, without depending on a second user click?

Thanks in advance for any help!

If it only works on the second click, that usually means that you are doing a workflow wrong. You need to make sure that you are using the right workflow to save the signature. It sounds like you are referencing the wrong thing since it only saves after the second click. Care to show your workflow in a full screen screenshot?

The issue stems from Bubble workflow pulls the value of the url at the start of the workflow, and not using the updated value on subsequent steps.

The solution is described here, basically start another workflow on the “is saved” event:

@mishav already provided the solution to this issue specifically, but just wanted to explain something many new developers aren’t aware of:

Pauses in workflows only pause visual elements, e.g. show/hide actions. Database actions aren’t paused, so if you add a 10 sec pause action followed by a create action and a hide element action, the create action will still trigger immediately on click, and only the hide action will take 10 sec to trigger.

If you need to add a pause to a workflow (a workaround you rarely need to use with well-made plugins, as those use element events instead), set up a frontend custom event and add the “Schedule a custom event” action to the “on click” workflow.