Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsonConfig port '0' cannot be changed by typing #2097

Closed
raintonr opened this issue Sep 4, 2023 · 2 comments · Fixed by #2099
Closed

jsonConfig port '0' cannot be changed by typing #2097

raintonr opened this issue Sep 4, 2023 · 2 comments · Fixed by #2099
Labels
json config Issues with JsonConfig components.

Comments

@raintonr
Copy link

raintonr commented Sep 4, 2023

Version 6.8.0
node: v16.20.2
js-controller: 5.0.8

When using jsonConfig element such as...

"port": {
  "label": "Listen port",
  "min": 1,
  "max": 65565,
  ...
},

... and the default port is undefined (ie. zero) then the field is rendered as expected (label, field with zero value) but... entering that field and trying to type a numeric value does not work:

  • Whatever number is entered: eg. '8' yields '08' - is very quickly automatically changed back to zero.
  • This can be overcome by moving the cursor in front of the initial zero and typing: eg. '8' now yields '80' which is not changed and the number can be edited as required.

While this bug can be worked around it's an annoying user experience.

@foxriver76 foxriver76 added the json config Issues with JsonConfig components. label Sep 4, 2023
@foxriver76
Copy link
Collaborator

I guess we are talking about using type: port, as the element type is missing in the example.

@raintonr
Copy link
Author

raintonr commented Sep 4, 2023

I guess we are talking about using type: port, as the element type is missing in the example.

Yes. Maybe I should have included that line 🤡

foxriver76 added a commit that referenced this issue Sep 7, 2023
foxriver76 added a commit that referenced this issue Sep 7, 2023
- closes #2097 
- and some TS ports and optimizations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
json config Issues with JsonConfig components.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants