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

Error in browser console when pressing Enter inside the event form #167

Open
MaxValue opened this issue Apr 27, 2023 · 2 comments
Open

Error in browser console when pressing Enter inside the event form #167

MaxValue opened this issue Apr 27, 2023 · 2 comments
Labels

Comments

@MaxValue
Copy link
Member

MaxValue commented Apr 27, 2023

Observed in latest commit of main branch (6966640) as well as prod.

Steps to reproduce:

  1. Go to the calendar.
  2. Click "Create new event".
  3. Click in any text field.
  4. Press Enter.

Expected behavior: Event gets submitted to the server.

Actual behavior: Nothing happens visible to the user but an error is logged in the console.

The problem is that the oneliner in the onKeyPress attribute in the event form selects the form but then submits that object to the submit_form() function which tries to select the form again, because this submit_form() function actually expects a 'form type' and a 'form id' argument.

The easier solution I guess would be to just fix the oneliner (maybe convert it to a function which just gets called), since submit_form() is also used by projectinfo.inc.

@ppiro
Copy link
Contributor

ppiro commented Apr 29, 2023

Event form submission is supposed to be done by submit_event, see the buttons at the bottom of the form. I believe the call to submit_form is a left over from previous times.

@MaxValue
Copy link
Member Author

Ah ok, so should we change the call to submit_event or remove the "press enter to submit event" feature alltogether?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants