[BUG-5568]One Shot Button issues - margin not working, confirmation prompt when button is disabled

Hi, the gateway I’m using is version 8.1.14 (b2022012711)
If the issue was fixed in the 8.1.15 nightly release, please let me know.

I found a couple issues with the One Shot Button in perspective.
The first one is that it doesn’t seem to apply margins and padding when it’s a flex container (I haven’t tested it for other types of containers).
The other issue is that when the .props.confirm is set to true it will popup the confirmation box even if the button is not enabled. It doesn’t run the ActionPerformed script though, which is less concerning, but it still seems inconsistent to me that it would ask for confirmation if it’s not enabled, after all it wouldn’t be able to run the script anyways. I found a simple workaround for now, which is binding the confirm.enabled to the props.enabled.



I am on 8.1.13 and cannot replicate the confirmation issue behavior.

I’m also unable to confirm while testing 8.1.15rc1. @apereira , is there any chance you could provide an export of the view in question?

I tried to reproduce the issue by creating a new button in a new view and it didn’t present the same behavior, so there might be something particular to this specific view. I exported the button alone and it still doing that, here’s the export file:

ONS_Button_bug.zip (3.0 KB)

Have you edited the JSON of this component in any way? I found the root cause, but we’re all at a loss as to how the component reached the current state.

If you examine the JSON of the component, you’ll find this piece within props:

      "confirm": {
        "enabled": true

but that piece should not exist while the property has a binding configured, which you very much do. Further down the JSON witin the propConfig area you can see this:

      "props.confirm.enabled": {
        "binding": {
          "type": "expr",
          "enabled": false,
          "config": {
            "expression": "{this.custom.ndx}>0"

We can’t explain how your component entered this state, but we can help you fix it. Please place a copy of the view.json file someplace safe in case you have any problems with the following steps.

  1. Right-click your One-Shot button, and select “Copy”.
  2. Open your favorite text editor, paste the contents of your clipboard, and then remove the following piece of code (INCLUDING THE PRECEDING COMMA):
    Screen Shot 2022-02-15 at 9.38.37 AM
  3. Copy the ENTIRE JSON structure from your editor (Ctrl+A and then Ctrl+C).
  4. Delete your One-Shot Button.
  5. Paste the contents of your clipboard (Ctrl-V).

I did what you mentioned, but that removed the confirmation function, and I still need it when it’s enabled. I’ve been trying to reproduce how the button got into this state and I think I found the actual culprit, it’s the icon (props.readyState.icon.path).

Here’s how to reproduce it in a few steps:

  • create a one-shot button
  • set props.confirm.enabled
  • set props.readyState.icon.path, for example as ‘material/remove’
  • disable the button (props.enabled = false)
  • active the view and click on the button


By the way, were you able to reproduce the other issue with the margin?

Thank you so much! The call-out of the icon is exactly what we needed on our end to lock this down. I’ve opened an internal ticket to get this fixed, but I’m not able to provide an ETA. For now, binding the confirmation’s enabled state to the buttons’s enabled state is probably a good idea.

  • I have not had time to look at the margin issue yet - I prioritized what looked to be your “breaking” issue.
1 Like

Margin bug still present in 8.1.15.

Has there been any activity on the margin bug? Noticing this is still present in 8.1.17.

Can be tough when using responsive layouts - you’re essentially backed in to using regular buttons for everything, which is a downgrade in terms of simple tag writes (especially those with confirmations).

No, the margin bug has not been fixed yet.

I do have a workaround for you:

  1. Right-click the One-Shot Button and select the “Wrap in Container” option.
  2. Select Flex Column (you could probably do coordinate, but I tested Flex Column).
  3. Apply your Margin settings to the Flex Container which is wrapping the One-Shot Button.
1 Like