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

A bug in Mapty project #406

Open
AmirhosseinHashemi opened this issue Nov 25, 2023 · 0 comments
Open

A bug in Mapty project #406

AmirhosseinHashemi opened this issue Nov 25, 2023 · 0 comments

Comments

@AmirhosseinHashemi
Copy link

First of all thanks for this fantastic course ♥.

For submit form when type is cycling we need elevation input, but when type is cycling and page reload, type is cycling and we have cadence input which is incorrect.

Screenshot (25)

I added last three line code to fix problem.
It is my solution :

  _showForm(mapE) {
    // receive and store data about coords that user clicked
    this.#mapEvent = mapE;

    form.classList.remove('hidden');
    inputDistance.focus();

    // reset inputs to initial value 
    inputCadence.closest('.form__row').classList.remove('form__row--hidden');
    inputElevation.closest('.form__row').classList.add('form__row--hidden');
    inputType.value = 'running';
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant