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

When trying to open the multiple photos menu on articles with multiple photos, the article form closes #57

Open
AndySok opened this issue Jan 19, 2021 · 2 comments
Labels
small project 2 of these and youre good for the year

Comments

@AndySok
Copy link
Contributor

AndySok commented Jan 19, 2021

See the title. If you try clicking on "show all photos" button, it should bring up the photos menu. Instead, the form treats the click as if the user edited the article, and closes the form instead.

image

How to reproduce:

  1. Go on any draft or article that has multiple photos
  2. Try opening the multiple photos menu
  3. The problem will occur at this step
@DJankauskas
Copy link
Member

Person who originally wrote the CMS here: this is a decently simple fix! The button is within a form tag, so clicking on it submits the form by default. The solution is to add type="button" to the button element to suppress that default. The relevant code is in this repo here, which is published as an npm package. The picture and chart components are shared across the CMS and stuyspec.com with that package. In order to make the change, one needs to first fix the package, publish a new version to npm, and then update the dependency in CMS and stuyspec.com. You might need the credentials for the account; feel free to email me if you do.

Once fixing it, you'll expose another bug: the styling of the fullscreen popup is horribly broken within the CMS. No idea why that's the case, but that's another issue for another time haha.

@AndySok
Copy link
Contributor Author

AndySok commented Apr 15, 2021

For devs: see Darius' response to the issue

@AndySok AndySok added the small project 2 of these and youre good for the year label Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
small project 2 of these and youre good for the year
Projects
None yet
Development

No branches or pull requests

2 participants