espanso icon indicating copy to clipboard operation
espanso copied to clipboard

Form choice box selects a value even if the default is `(empty)`

Open revolter opened this issue 3 years ago • 3 comments

Describe the bug

If you create a simple form with a choice box, the first value gets selected by default, even if you don't set the default property.

To Reproduce Steps to reproduce the behavior:

  1. Add this to your config

    matches:
      - trigger: ":form"
        form: |
          [[choices]]
        form_fields:
          choices:
            type: choice
            values:
              - First choice
              - Second choice
    
  2. Type :form

Expected behavior

No value should have been selected by default, because the documentation states that the default value of the default property is (empty), not the first value.

Screenshots

image

Logs If possible, run espanso log in a terminal after the bug has occurred, then post the output here so that we can better diagnose the problem

Setup information

  • OS: macOS 12.4 (21F79)
  • Version: espanso 2.1.6-beta

revolter avatar Jul 13 '22 06:07 revolter

I have the same issue (MacOS 13 + Espanso 2.1.8) However, in Windows 11 it works as expected.

alexrubtsov avatar Nov 10 '23 06:11 alexrubtsov

Is this still a problem with the current release? It works fine here (Linux).

smeech avatar Feb 15 '24 23:02 smeech

On macOS, yes, it's still a problem

revolter avatar Feb 18 '24 09:02 revolter