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

Cannot create channel via admin ui in safari when only a single zone exists #1036

Closed
njdancer opened this issue Aug 14, 2021 · 2 comments
Closed
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@njdancer
Copy link

njdancer commented Aug 14, 2021

Describe the bug
When trying to create a channel you must specify a default tax zone and shipping zone. The form used to create a channel in the admin UI leaves these fields empty when viewing in Chrome but populates them in Safari. If you only have a single zone available then this zone becomes preselected however this is not detected by the form validation. I assume the angular private state only gets this value on change and as the preselected value cannot be unselected the field is never able to change, therefore the form is always considered invalid and can never be submitted.

To Reproduce
Steps to reproduce the behavior:

  1. Start Vendure with the admin-ui plugin enabled and a single zone configured.
  2. In Safari, login to the admin UI, visit Settings > Channel and select "CREATE NEW CHANNEL"
  3. Attempt to complete the form and save the channel. You should observe that this is impossible as the default tax zone and default shipping zones are permanently considered invalid.

image

Expected behavior
Safari should behave the same as chrome, i.e. the field is empty until selected by the user. Alternatively, the behaviour could be updated so that this preselected value is picked up by the validation logic and allows the form to complete. This makes a lot of sense in the case where only a single zone exists however I understand this may be uncommon and is less desirable when multiple zones exist.

Environment (please complete the following information):

  • @vendure/core version: 1.1.3
  • Nodejs version: v14.17.2
  • Database (mysql/postgres etc): postgres
  • Safari: 14.1.1(Mac OS Big Sur 11.4)

Additional context
This can be worked around for now by creating an unused zone or simply avoiding Safari and using Chrome(haven't tested other browsers).

Would also like to just say great job on Vendure. Have only started using it recently but am really enjoying it so far. I'm not terribly familiar with Angular and I imagine this is quite a simple fix for someone who is. With that said I may be able to assist with a resolution if this hangs around for too long.

@njdancer njdancer added the type: bug 🐛 Something isn't working label Aug 14, 2021
@michaelbromley
Copy link
Member

Hi Nick, thanks for the report. I'm developing on Windows so never came across this, and have no easy way to test a fix unfortunately.

I'll add it to the "planned" list and see if someone in the Slack group running macOS wants to have a go at fixing. If you do decide to fix, just leave a comment here so people know it is being worked on.

@kata-kas
Copy link
Contributor

I'll take this one 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants